[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [13086] trunk/blender/source/blender/ blenlib/intern/BLI_ghash.c: Bugfix #8032
Ton Roosendaal
ton at blender.org
Tue Jan 1 15:13:38 CET 2008
Revision: 13086
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=13086
Author: ton
Date: 2008-01-01 15:13:37 +0100 (Tue, 01 Jan 2008)
Log Message:
-----------
Bugfix #8032
The warning i've coded 1.5 year ago, to warn when a .blend was written
by newer executable, failed on the .B.blend load case... UI not property
initialized then.
This at least fixes the crash, a menu won't pop up correctly though...
luckily the warning works for regular load or ctrl-x
Modified Paths:
--------------
trunk/blender/source/blender/blenlib/intern/BLI_ghash.c
Modified: trunk/blender/source/blender/blenlib/intern/BLI_ghash.c
===================================================================
--- trunk/blender/source/blender/blenlib/intern/BLI_ghash.c 2008-01-01 14:04:09 UTC (rev 13085)
+++ trunk/blender/source/blender/blenlib/intern/BLI_ghash.c 2008-01-01 14:13:37 UTC (rev 13086)
@@ -117,14 +117,16 @@
}
}
-void* BLI_ghash_lookup(GHash *gh, void *key) {
- unsigned int hash= gh->hashfp(key)%gh->nbuckets;
- Entry *e;
-
- for (e= gh->buckets[hash]; e; e= e->next)
- if (gh->cmpfp(key, e->key)==0)
- return e->val;
-
+void* BLI_ghash_lookup(GHash *gh, void *key)
+{
+ if(gh) {
+ unsigned int hash= gh->hashfp(key)%gh->nbuckets;
+ Entry *e;
+
+ for (e= gh->buckets[hash]; e; e= e->next)
+ if (gh->cmpfp(key, e->key)==0)
+ return e->val;
+ }
return NULL;
}
More information about the Bf-blender-cvs
mailing list