Fix:Core:Don't crash in callback_list_call_attr if there are no callbacks
authortinloaf <tinloaf@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Tue, 17 Mar 2009 21:19:25 +0000 (21:19 +0000)
committertinloaf <tinloaf@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Tue, 17 Mar 2009 21:19:25 +0000 (21:19 +0000)
git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk/navit@2142 ffa7fe5e-494d-0410-b361-a75ebd5db220

navit/callback.c

index 4b5280f..a3f07cd 100644 (file)
@@ -206,6 +206,10 @@ callback_list_call_attr(struct callback_list *l, enum attr_type type, int pcount
        GList *cbi;
        struct callback *cb;
 
+       if (!l) {
+               return;
+       }
+
        cbi=l->list;
        while (cbi) {
                cb=cbi->data;