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