]> git.decadent.org.uk Git - ion3.git/blobdiff - libmainloop/hooks.c
Imported Upstream version 20090110
[ion3.git] / libmainloop / hooks.c
index 1a15bc97046e42d907738ed37ec750e120762683..3d8a8feac1bddb80de4d71fd801a52e2f62e1ae1 100644 (file)
@@ -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 <libtu/types.h>
@@ -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);