efl/io_model: check for parent object existence before removing wref
authorMike Blumenkrantz <zmike@samsung.com>
Wed, 29 May 2019 13:23:29 +0000 (09:23 -0400)
committerWonki Kim <wonki_.kim@samsung.com>
Mon, 3 Jun 2019 07:01:26 +0000 (16:01 +0900)
Summary:
if the wref automatically removes this pointer then there's no need to
remove the wref on the pointer

@fix
Depends on D8973

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8974

src/lib/eio/efl_io_model.c

index 54dc6a2..b4ae262 100644 (file)
@@ -1039,7 +1039,7 @@ _efl_io_model_efl_object_invalidate(Eo *obj , Efl_Io_Model_Data *priv)
    _efl_io_model_efl_model_monitor_del(priv);
 
    // Unlink the object from the parent
-   if (priv->info)
+   if (priv->info && priv->info->object)
      {
         efl_wref_del(priv->info->object, &priv->info->object);
         priv->info->object = NULL;