fix crash when access pager_config which is null.
authorSeunghun Lee <shiin.lee@samsung.com>
Thu, 3 Apr 2014 10:23:57 +0000 (19:23 +0900)
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>
Thu, 3 Apr 2014 10:23:57 +0000 (19:23 +0900)
Summary:
crash was happend when user do logout the enlightenment with pager16.
pager_config was freed in e_modapi_shutdown(),
but after that, there was accessing pager_config again in _gc_shutdown() by called gadman_shutdown().

Reviewers: zmike, raster, cedric, seoz

CC: cedric
Differential Revision: https://phab.enlightenment.org/D694

src/modules/pager16/e_mod_main.c

index 6662500ff9e38c73589ba9d832d00983f19e350b..205c3e29135dc62078d732bd43db46711549ae19 100644 (file)
@@ -244,7 +244,8 @@ _gc_shutdown(E_Gadcon_Client *gcc)
    Instance *inst;
 
    inst = gcc->data;
-   pager_config->instances = eina_list_remove(pager_config->instances, inst);
+   if (pager_config)
+     pager_config->instances = eina_list_remove(pager_config->instances, inst);
    e_drop_handler_del(inst->pager->drop_handler);
    _pager_free(inst->pager);
    free(inst);