Revision: 28440
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=28440
Author:   genscher
Date:     2010-04-26 22:30:13 +0200 (Mon, 26 Apr 2010)

Log Message:
-----------
Add missing null check solving crash on texture panel, also fix possible 
'freeing NULL' because of misplaced MEM_freeN() in that context.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/interface/interface_layout.c

Modified: trunk/blender/source/blender/editors/interface/interface_layout.c
===================================================================
--- trunk/blender/source/blender/editors/interface/interface_layout.c   
2010-04-26 20:24:51 UTC (rev 28439)
+++ trunk/blender/source/blender/editors/interface/interface_layout.c   
2010-04-26 20:30:13 UTC (rev 28440)
@@ -1105,9 +1105,11 @@
                if(flag & PROP_ID_SELF_CHECK)
                        if(itemptr.data == but->rnapoin.id.data)
                                continue;
-               
-               if(RNA_struct_is_ID(itemptr.type))
+
+               if(itemptr.type && RNA_struct_is_ID(itemptr.type))
                        iconid= ui_id_icon_get((bContext*)C, itemptr.data, 0);
+        else
+            iconid = 0;
                
                name= RNA_struct_name_get_alloc(&itemptr, NULL, 0);
                
@@ -1119,8 +1121,8 @@
                                cis->iconid = iconid;
                                BLI_addtail(items_list, cis);
                        }
+               MEM_freeN(name);
                }
-               MEM_freeN(name);
                
                i++;
        }


_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to