X-Git-Url: https://git.decadent.org.uk/gitweb/?p=ion3.git;a=blobdiff_plain;f=libmainloop%2Fhooks.c;h=3d8a8feac1bddb80de4d71fd801a52e2f62e1ae1;hp=1a15bc97046e42d907738ed37ec750e120762683;hb=e3aec18706513a87eaa7839dfdaf7e0fcd0d8d2a;hpb=8366314611bf30a0f31d25bf5f5023186fa87692 diff --git a/libmainloop/hooks.c b/libmainloop/hooks.c index 1a15bc9..3d8a8fe 100644 --- a/libmainloop/hooks.c +++ b/libmainloop/hooks.c @@ -1,12 +1,9 @@ /* * ion/mainloop/hooks.c * - * Copyright (c) Tuomo Valkonen 1999-2006. + * Copyright (c) Tuomo Valkonen 1999-2009. * - * Ion is free software; you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation; either version 2.1 of the License, or - * (at your option) any later version. + * See the included file LICENSE for details. */ #include @@ -95,6 +92,9 @@ EXTL_SAFE EXTL_EXPORT WHook *mainloop_get_hook(const char *name) { + if(name==NULL) + return NULL; + if(named_hooks!=NULL){ bool found=FALSE; Rb_node node=rb_find_key_n(named_hooks, name, &found);