amb: fixes to error cases.
authorIsmo Puustinen <ismo.puustinen@intel.com>
Tue, 4 Feb 2014 11:04:47 +0000 (13:04 +0200)
committerKrisztian Litkey <krisztian.litkey@intel.com>
Thu, 8 Jan 2015 16:37:12 +0000 (18:37 +0200)
Change-Id: I4c50b7e89d393c1f682168ba06ae059b76ea1096

src/plugins/plugin-amb.c

index a4df284..46ae57b 100644 (file)
@@ -517,7 +517,8 @@ static int amb_constructor(lua_State *L)
     MRP_LUA_LEAVE(1);
 
 error:
-    destroy_prop(global_ctx, w);
+    if (w)
+        destroy_prop(global_ctx, w);
 
     mrp_log_error("AMB: amb_constructor error: %s", error);
     MRP_LUA_LEAVE(0);
@@ -949,6 +950,7 @@ static int property_signal_handler(mrp_dbus_t *dbus, mrp_dbus_msg_t *msg,
 
     if (!msg) {
         mrp_log_error("AMB: message is NULL");
+        return TRUE;
     }
 
     if (mrp_dbus_msg_arg_type(msg, NULL) != MRP_DBUS_TYPE_STRING)  {