Adds a missing null check
@@ -1640,6 +1640,7 @@ void fw_removeServiceListener(framework_pt framework, bundle_pt bundle, celix_se
fw_getService(framework, framework->bundle, ref, (const void **) &hook);
+ if (hook != NULL) {
arrayList_create(&infos);
arrayList_add(infos, &info);
hook->removed(hook->handle, infos);
@@ -1647,6 +1648,7 @@ void fw_removeServiceListener(framework_pt framework, bundle_pt bundle, celix_se
serviceRegistry_ungetServiceReference(framework->registry, framework->bundle, ref);
arrayList_destroy(infos);
}
+ }
arrayList_destroy(listenerHooks);
}
