X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=libmainloop%2Fhooks.c;h=4a3a9f722a064fd3d2a21e28ff083846025522bd;hb=3102bb90c325d9b29ac304d8f3ea0a17df564fc8;hp=1a15bc97046e42d907738ed37ec750e120762683;hpb=8366314611bf30a0f31d25bf5f5023186fa87692;p=ion3.git diff --git a/libmainloop/hooks.c b/libmainloop/hooks.c index 1a15bc9..4a3a9f7 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-2008. * - * 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);