This is an automated email from the ASF dual-hosted git repository.

rbulter pushed a commit to branch feature/update_end_point_test
in repository https://gitbox.apache.org/repos/asf/celix.git


The following commit(s) were added to refs/heads/feature/update_end_point_test 
by this push:
     new 50e2546  remove segfault in framework
50e2546 is described below

commit 50e25464c8d40b0e5bb6c0a800689475c2954140
Author: Roy Bulter <[email protected]>
AuthorDate: Wed Apr 29 09:56:04 2020 +0200

    remove segfault in framework
---
 libs/framework/src/framework.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libs/framework/src/framework.c b/libs/framework/src/framework.c
index 586c639..3c4581a 100644
--- a/libs/framework/src/framework.c
+++ b/libs/framework/src/framework.c
@@ -1004,6 +1004,11 @@ celix_status_t fw_stopBundle(framework_pt framework, 
long bndId, bool record) {
     char *error = NULL;
 
     celix_framework_bundle_entry_t *entry = 
fw_bundleEntry_getBundleEntryAndIncreaseUseCount(framework, bndId);
+    if (entry == NULL) {
+      status = CELIX_ILLEGAL_STATE;
+      fw_logCode(framework->logger, OSGI_FRAMEWORK_LOG_ERROR, status, "Cannot 
stop bundle [%ld]: cannot find bundle entry", bndId);
+      return status;
+    }
 
     if (record) {
            status = CELIX_DO_IF(status, 
bundle_setPersistentStateInactive(entry->bnd));

Reply via email to