[Bf-blender-cvs] [85740a1] temp_widgets_c++_experiment: Fix startup crash
Julian Eisel
noreply at git.blender.org
Sun Dec 20 19:36:32 CET 2015
Commit: 85740a10b431fa6bac165154bf44995a9a06084a
Author: Julian Eisel
Date: Sun Dec 20 19:20:42 2015 +0100
Branches: temp_widgets_c++_experiment
https://developer.blender.org/rB85740a10b431fa6bac165154bf44995a9a06084a
Fix startup crash
There are other startup crashes still, will look into them separately.
Also minor cleanup.
===================================================================
M source/blender/windowmanager/intern/widgets/wm_widgetmaptype.cc
M source/blender/windowmanager/intern/widgets/wm_widgets_c_api.cc
===================================================================
diff --git a/source/blender/windowmanager/intern/widgets/wm_widgetmaptype.cc b/source/blender/windowmanager/intern/widgets/wm_widgetmaptype.cc
index 210db03..d4b5faf 100644
--- a/source/blender/windowmanager/intern/widgets/wm_widgetmaptype.cc
+++ b/source/blender/windowmanager/intern/widgets/wm_widgetmaptype.cc
@@ -65,6 +65,7 @@ wmWidgetMapType *WM_widgetmaptype_find(
wmaptype->spaceid = spaceid;
wmaptype->regionid = regionid;
wmaptype->is_3d = is_3d;
+ wmaptype->widgetgrouptypes.first = wmaptype->widgetgrouptypes.last = NULL;
BLI_strncpy(wmaptype->idname, idname, MAX_NAME);
BLI_addhead(&widgetmaptypes, wmaptype);
diff --git a/source/blender/windowmanager/intern/widgets/wm_widgets_c_api.cc b/source/blender/windowmanager/intern/widgets/wm_widgets_c_api.cc
index 60b9f85..1748241 100644
--- a/source/blender/windowmanager/intern/widgets/wm_widgets_c_api.cc
+++ b/source/blender/windowmanager/intern/widgets/wm_widgets_c_api.cc
@@ -90,20 +90,21 @@ wmWidgetGroupType *WM_widgetgrouptype_new(
wmWidgetMapType *wmaptype = WM_widgetmaptype_find(mapidname, spaceid, regionid, is_3d, false);
if (!wmaptype) {
- fprintf(stderr, "widgetgrouptype creation: widgetmap type does not exist");
+ fprintf(stderr, "widgetgrouptype creation: widgetmap type does not exist\n");
return NULL;
}
wmWidgetGroupType *wgrouptype = new wmWidgetGroupType;
+
/* add the type for future created areas of the same type */
BLI_addtail(&wmaptype->widgetgrouptypes, wgrouptype);
wgrouptype->init(wmaptype, wgrouptype,
- poll, create, keymap_init,
- bmain, mapidname, name,
- spaceid, regionid, is_3d);
+ poll, create, keymap_init,
+ bmain, mapidname, name,
+ spaceid, regionid, is_3d);
return wgrouptype;
}
More information about the Bf-blender-cvs
mailing list