[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [39550] branches/soc-2011-onion/source/ blender/editors/sculpt_paint/paint_utils.c: fix crash when exiting paint mode
Antony Riakiotakis
kalast at gmail.com
Fri Aug 19 14:58:21 CEST 2011
Revision: 39550
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=39550
Author: psy-fi
Date: 2011-08-19 12:58:20 +0000 (Fri, 19 Aug 2011)
Log Message:
-----------
fix crash when exiting paint mode
Modified Paths:
--------------
branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_utils.c
Modified: branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_utils.c
===================================================================
--- branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_utils.c 2011-08-19 10:38:34 UTC (rev 39549)
+++ branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_utils.c 2011-08-19 12:58:20 UTC (rev 39550)
@@ -523,11 +523,12 @@
so that settings can persist when switching back to the same paint mode */
void paint_mode_exit(struct Paint *p)
{
- paint_cursor_stop(p->cache);
-
- free_cache(p->cache);
- p->cache= NULL;
- p->free_cache= NULL;
+ if(p){
+ paint_cursor_stop(p->cache);
+ free_cache(p->cache);
+ p->cache= NULL;
+ p->free_cache= NULL;
+ }
}
int paint_poll(const struct bContext *C)
More information about the Bf-blender-cvs
mailing list