Dude, why don't u zero the win pointer if it's global or handle the _cb_del the pointer to it and zero it
On Wednesday, July 18, 2012, Enlightenment SVN wrote: > Log: > terminology: correctly detect death of window. > > > Author: cedric > Date: 2012-07-18 00:18:45 -0700 (Wed, 18 Jul 2012) > New Revision: 74045 > Trac: http://trac.enlightenment.org/e/changeset/74045 > > Modified: > trunk/terminology/src/bin/main.c > > Modified: trunk/terminology/src/bin/main.c > =================================================================== > --- trunk/terminology/src/bin/main.c 2012-07-18 07:08:42 UTC (rev 74044) > +++ trunk/terminology/src/bin/main.c 2012-07-18 07:18:45 UTC (rev 74045) > @@ -17,8 +17,15 @@ > static Evas_Object *conform = NULL; > static Ecore_Timer *flush_timer = NULL; > static Eina_Bool focused = EINA_FALSE; > +static Eina_Bool win_deleted = EINA_FALSE; > > static void > +_cb_del(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj > __UNUSED__, void *event __UNUSED__) > +{ > + win_deleted = EINA_TRUE; > +} > + > +static void > _cb_focus_in(void *data, Evas_Object *obj __UNUSED__, void *event > __UNUSED__) > { > if (!focused) elm_win_urgent_set(win, EINA_FALSE); > @@ -426,6 +433,7 @@ > > win = tg_win_add(name, role, title, icon_name); > > + evas_object_event_callback_add(win, EVAS_CALLBACK_DEL, _cb_del, NULL); > elm_win_conformant_set(win, EINA_TRUE); > > if (fullscreen) elm_win_fullscreen_set(win, EINA_TRUE); > @@ -497,7 +505,7 @@ > config_del(config); > config_shutdown(); > > - evas_object_del(win); > + if (!win_deleted) evas_object_del(win); > > eina_log_domain_unregister(_log_domain); > _log_domain = -1; > > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > enlightenment-svn mailing list > [email protected] <javascript:;> > https://lists.sourceforge.net/lists/listinfo/enlightenment-svn > -- Gustavo Sverzut Barbieri http://profusion.mobi embedded systems -------------------------------------- MSN: [email protected] Skype: gsbarbieri Mobile: +55 (19) 9225-2202 ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
