Mercurial > geeqie.yaz
diff src/filedata.c @ 1709:b16a453bfde6
fixed vd_notify_cb leak
author | nadvornik |
---|---|
date | Fri, 28 Aug 2009 23:09:05 +0000 |
parents | 8213f95b65c9 |
children | 30d649102a9f |
line wrap: on
line diff
--- a/src/filedata.c Fri Aug 28 20:18:46 2009 +0000 +++ b/src/filedata.c Fri Aug 28 23:09:05 2009 +0000 @@ -2535,6 +2535,19 @@ gboolean file_data_register_notify_func(FileDataNotifyFunc func, gpointer data, NotifyPriority priority) { NotifyData *nd; + GList *work = notify_func_list; + + while (work) + { + NotifyData *nd = (NotifyData *)work->data; + + if (nd->func == func && nd->data == data) + { + g_warning("Notify func already registered"); + return FALSE; + } + work = work->next; + } nd = g_new(NotifyData, 1); nd->func = func; @@ -2565,6 +2578,7 @@ work = work->next; } + g_warning("Notify func not found"); return FALSE; }