hmm make it mroe robust...

SVN revision: 10188
This commit is contained in:
Carsten Haitzler 2004-05-13 02:40:58 +00:00
parent 56c4d96737
commit d39d9de182
1 changed files with 27 additions and 25 deletions

View File

@ -1,6 +1,4 @@
/* Ecore Event Handler Example. /* Ecore Event Handler Example. */
*/
#include <Ecore.h> #include <Ecore.h>
Ecore_Event_Handler *handler1 = NULL, *handler2 = NULL; Ecore_Event_Handler *handler1 = NULL, *handler2 = NULL;
@ -8,7 +6,11 @@ Ecore_Event_Handler *handler1 = NULL, *handler2 = NULL;
int event_hup(void *data, int ev_type, void *ev) int event_hup(void *data, int ev_type, void *ev)
{ {
printf("Hup signal! Remove the exit handler.\n"); printf("Hup signal! Remove the exit handler.\n");
if (handler1)
{
ecore_event_handler_del(handler1); ecore_event_handler_del(handler1);
handler1 = NULL;
}
return 0; return 0;
} }