You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@celix.apache.org by er...@apache.org on 2017/02/24 22:49:55 UTC
celix git commit: CELIX-404: Fix for crash with inspect command
Repository: celix
Updated Branches:
refs/heads/develop 6785a38c4 -> b6c369907
CELIX-404: Fix for crash with inspect command
Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/b6c36990
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/b6c36990
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/b6c36990
Branch: refs/heads/develop
Commit: b6c36990718c8f46e61150aee79fe189a7803731
Parents: 6785a38
Author: Erjan Altena <er...@gmail.com>
Authored: Fri Feb 24 23:49:15 2017 +0100
Committer: Erjan Altena <er...@gmail.com>
Committed: Fri Feb 24 23:49:15 2017 +0100
----------------------------------------------------------------------
framework/private/src/service_registry.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/celix/blob/b6c36990/framework/private/src/service_registry.c
----------------------------------------------------------------------
diff --git a/framework/private/src/service_registry.c b/framework/private/src/service_registry.c
index 8df355f..d27cc32 100644
--- a/framework/private/src/service_registry.c
+++ b/framework/private/src/service_registry.c
@@ -607,12 +607,14 @@ celix_status_t serviceRegistry_getServicesInUse(service_registry_pt registry, bu
hash_map_pt refsMap = hashMap_get(registry->serviceReferences, bundle);
- hash_map_iterator_pt iter = hashMapIterator_create(refsMap);
- while (hashMapIterator_hasNext(iter)) {
- service_reference_pt ref = hashMapIterator_nextValue(iter);
- arrayList_add(result, ref);
+ if(refsMap) {
+ hash_map_iterator_pt iter = hashMapIterator_create(refsMap);
+ while (hashMapIterator_hasNext(iter)) {
+ service_reference_pt ref = hashMapIterator_nextValue(iter);
+ arrayList_add(result, ref);
+ }
+ hashMapIterator_destroy(iter);
}
- hashMapIterator_destroy(iter);
//UNLOCK
celixThreadRwlock_unlock(®istry->lock);