summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>2012-08-31 18:58:18 +0000
committerMike Blumenkrantz <michael.blumenkrantz@gmail.com>2012-08-31 18:58:18 +0000
commit3f3466c415923e7b2fdfa506e9da5d7771280524 (patch)
tree3cb20841795bbe72c1d3a001dfa3b8a4176b0207
parente440668ea8e40aab17a40d1d651b22a8ec43d075 (diff)
fix crashing when deleting shelves
ticket #1439 SVN revision: 75924
-rw-r--r--src/bin/e_shelf.c16
-rw-r--r--src/bin/e_shelf.h1
2 files changed, 11 insertions, 6 deletions
diff --git a/src/bin/e_shelf.c b/src/bin/e_shelf.c
index 7a552cf..2b58b81 100644
--- a/src/bin/e_shelf.c
+++ b/src/bin/e_shelf.c
@@ -1065,6 +1065,15 @@ _e_shelf_free_cb(void *data __UNUSED__, void *event)
1065 } 1065 }
1066 e_object_del(E_OBJECT(es->popup)); 1066 e_object_del(E_OBJECT(es->popup));
1067 } 1067 }
1068 if (es->cfg_delete)
1069 {
1070 e_config->shelves = eina_list_remove(e_config->shelves, es->cfg);
1071 eina_stringshare_del(es->cfg->name);
1072 eina_stringshare_del(es->cfg->style);
1073 free(es->cfg);
1074
1075 e_config_save_queue();
1076 }
1068 free(es); 1077 free(es);
1069} 1078}
1070 1079
@@ -1510,13 +1519,8 @@ _e_shelf_cb_confirm_dialog_yes(void *data)
1510 es = data; 1519 es = data;
1511 cfg = es->cfg; 1520 cfg = es->cfg;
1512 if (e_object_is_del(E_OBJECT(es))) return; 1521 if (e_object_is_del(E_OBJECT(es))) return;
1522 es->cfg_delete = 1;
1513 e_object_del(E_OBJECT(es)); 1523 e_object_del(E_OBJECT(es));
1514 e_config->shelves = eina_list_remove(e_config->shelves, cfg);
1515 if (cfg->name) eina_stringshare_del(cfg->name);
1516 if (cfg->style) eina_stringshare_del(cfg->style);
1517 E_FREE(cfg);
1518
1519 e_config_save_queue();
1520} 1524}
1521 1525
1522static void 1526static void
diff --git a/src/bin/e_shelf.h b/src/bin/e_shelf.h
index 225ffe2..0ebba87 100644
--- a/src/bin/e_shelf.h
+++ b/src/bin/e_shelf.h
@@ -45,6 +45,7 @@ struct _E_Shelf
45 unsigned char edge : 1; 45 unsigned char edge : 1;
46 unsigned char urgent_show : 1; 46 unsigned char urgent_show : 1;
47 unsigned char dummy : 1; 47 unsigned char dummy : 1;
48 Eina_Bool cfg_delete : 1;
48 unsigned int locked; 49 unsigned int locked;
49}; 50};
50 51