]> git.decadent.org.uk Git - ion3.git/blobdiff - libmainloop/hooks.c
[svn-upgrade] Integrating new upstream version, ion3 (20070203)
[ion3.git] / libmainloop / hooks.c
index 1a15bc97046e42d907738ed37ec750e120762683..9b873a5def40ff28d68b3b30548f2c2c3f6398a7 100644 (file)
@@ -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);