[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [57564] trunk/blender/source/blender/ editors/sculpt_paint/paint_vertex.c: fix [#35793] Crash When Painting Gradient Weight

Campbell Barton ideasman42 at gmail.com
Wed Jun 19 09:45:36 CEST 2013


Revision: 57564
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=57564
Author:   campbellbarton
Date:     2013-06-19 07:45:36 +0000 (Wed, 19 Jun 2013)
Log Message:
-----------
fix [#35793] Crash When Painting Gradient Weight

Modified Paths:
--------------
    trunk/blender/source/blender/editors/sculpt_paint/paint_vertex.c

Modified: trunk/blender/source/blender/editors/sculpt_paint/paint_vertex.c
===================================================================
--- trunk/blender/source/blender/editors/sculpt_paint/paint_vertex.c	2013-06-19 06:31:37 UTC (rev 57563)
+++ trunk/blender/source/blender/editors/sculpt_paint/paint_vertex.c	2013-06-19 07:45:36 UTC (rev 57564)
@@ -2145,7 +2145,7 @@
 };
 
 /* ensure we have data on wpaint start, add if needed */
-static int wpaint_ensure_data(bContext *C, wmOperator *op)
+static bool wpaint_ensure_data(bContext *C, wmOperator *op)
 {
 	Scene *scene = CTX_data_scene(C);
 	Object *ob = CTX_data_active_object(C);
@@ -3390,6 +3390,10 @@
 		vert_cache = gesture->userdata;
 	}
 	else {
+		if (wpaint_ensure_data(C, op) == FALSE) {
+			return OPERATOR_CANCELLED;
+		}
+
 		data.is_init = true;
 		vert_cache = MEM_mallocN(sizeof(DMGradient_vertStore) * me->totvert, __func__);
 	}




More information about the Bf-blender-cvs mailing list