[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [26437] trunk/blender/source/blender/ editors/interface/interface.c: bugfix [#20888] Crash when following instructions on the Blender Wiki and then clicking on the outliner
Campbell Barton
ideasman42 at gmail.com
Sat Jan 30 16:44:11 CET 2010
Revision: 26437
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=26437
Author: campbellbarton
Date: 2010-01-30 16:44:11 +0100 (Sat, 30 Jan 2010)
Log Message:
-----------
bugfix [#20888] Crash when following instructions on the Blender Wiki and then clicking on the outliner
Modified Paths:
--------------
trunk/blender/source/blender/editors/interface/interface.c
Modified: trunk/blender/source/blender/editors/interface/interface.c
===================================================================
--- trunk/blender/source/blender/editors/interface/interface.c 2010-01-30 15:29:22 UTC (rev 26436)
+++ trunk/blender/source/blender/editors/interface/interface.c 2010-01-30 15:44:11 UTC (rev 26437)
@@ -1491,11 +1491,14 @@
}
else if(but->type == IDPOIN) {
/* ID pointer */
- ID *id= *(but->idpoin_idpp);
-
- if(id) BLI_strncpy(str, id->name+2, maxlen);
- else BLI_strncpy(str, "", maxlen);
-
+ if(but->idpoin_idpp) { /* Can be NULL for ID properties by python */
+ ID *id= *(but->idpoin_idpp);
+ if(id)
+ BLI_strncpy(str, id->name+2, maxlen);
+ }
+ else {
+ str[0] = '\0';
+ }
return;
}
else if(but->type == TEX) {
More information about the Bf-blender-cvs
mailing list