X-Git-Url: https://git.decadent.org.uk/gitweb/?p=ion3.git;a=blobdiff_plain;f=libmainloop%2Fhooks.c;fp=libmainloop%2Fhooks.c;h=9b873a5def40ff28d68b3b30548f2c2c3f6398a7;hp=1a15bc97046e42d907738ed37ec750e120762683;hb=803afbc1cd633f6c025bcd9537e9b7e9aedadd0d;hpb=8366314611bf30a0f31d25bf5f5023186fa87692 diff --git a/libmainloop/hooks.c b/libmainloop/hooks.c index 1a15bc9..9b873a5 100644 --- a/libmainloop/hooks.c +++ b/libmainloop/hooks.c @@ -1,7 +1,7 @@ /* * 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 @@ -95,6 +95,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);