Fix crash on texture painting after new scene is added, reported by

kopias on irc, thanks.
This commit is contained in:
Antonis Ryakiotakis 2014-08-14 13:06:40 +02:00
parent da60d0889d
commit a2dfeeaec0
1 changed files with 1 additions and 1 deletions

View File

@ -1393,7 +1393,7 @@ void paint_proj_mesh_data_ensure(bContext *C, Object *ob, wmOperator *op)
}
/* Make sure we have a stencil to paint on! */
if (br->imagepaint_tool == PAINT_TOOL_MASK) {
if (br && br->imagepaint_tool == PAINT_TOOL_MASK) {
imapaint->flag |= IMAGEPAINT_PROJECT_LAYER_STENCIL;
if (imapaint->stencil == NULL) {