Fix crash due to shared paint cursor function. It is necessary to check

if we really are in sculpt mode context since the active object may be
in sculpt mode while cursor is in the 2d paint editor.
This commit is contained in:
Antony Riakiotakis
2013-05-18 15:51:40 +00:00
parent 1c314aae73
commit ef40cdc167

View File

@@ -809,7 +809,7 @@ static void paint_draw_cursor(bContext *C, int x, int y, void *UNUSED(unused))
/* TODO: as sculpt and other paint modes are unified, this
* special mode of drawing will go away */
if (vc.obact && vc.obact->sculpt) {
if ((mode == PAINT_SCULPT) && vc.obact->sculpt) {
float location[3];
int pixel_radius, hit;