Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2014-09-10 17:02:31 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-09-10 17:12:11 +0400
commit229c2c14f796b9d446301d9b0b8091c5e8a4f2ab (patch)
tree5686402f33da816638c00d817163f9bb8a77b6bb /source/blender/editors/sculpt_paint/paint_image.c
parent7d9760d96212aebf8bb1fc89f89e248a81ed0d2a (diff)
Fix crash in project-from view without a brush or active object
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_image.c')
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index ebfb17d25ef..7c19528a049 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -591,11 +591,12 @@ static Brush *image_paint_brush(bContext *C)
static int image_paint_poll(bContext *C)
{
- Object *obact = CTX_data_active_object(C);
+ Object *obact;
if (!image_paint_brush(C))
return 0;
+ obact = CTX_data_active_object(C);
if ((obact && obact->mode & OB_MODE_TEXTURE_PAINT) && CTX_wm_region_view3d(C)) {
return 1;
}