Page Menu
Home
Search
Configure Global Search
Log In
Paste
P199
T43634
Active
Public
Actions
Authored by
Kévin Dietrich (kevindietrich)
on Feb 11 2015, 11:45 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Tags
None
Subscribers
None
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index 5cfbd16..3a9ba0c 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -1492,16 +1492,20 @@ void PAINT_OT_brush_colors_flip(wmOperatorType *ot)
void ED_imapaint_bucket_fill(struct bContext *C, float color[3], wmOperator *op)
{
SpaceImage *sima = CTX_wm_space_image(C);
- Image *ima = sima->image;
+ Image *ima = NULL;
- ED_undo_paint_push_begin(UNDO_PAINT_IMAGE, op->type->name,
- ED_image_undo_restore, ED_image_undo_free, NULL);
+ if (sima) {
+ ima = sima->image;
- paint_2d_bucket_fill(C, color, NULL, NULL, NULL);
+ ED_undo_paint_push_begin(UNDO_PAINT_IMAGE, op->type->name,
+ ED_image_undo_restore, ED_image_undo_free, NULL);
- ED_undo_paint_push_end(UNDO_PAINT_IMAGE);
+ paint_2d_bucket_fill(C, color, NULL, NULL, NULL);
- DAG_id_tag_update(&ima->id, 0);
+ ED_undo_paint_push_end(UNDO_PAINT_IMAGE);
+
+ DAG_id_tag_update(&ima->id, 0);
+ }
}
Event Timeline
Kévin Dietrich (kevindietrich)
edited the content of this paste.
(Show Details)
Feb 11 2015, 11:45 PM
Kévin Dietrich (kevindietrich)
changed the title of this paste from untitled to
T43634
.
Kévin Dietrich (kevindietrich)
updated the paste's language from
autodetect
to
diff
.
Kévin Dietrich (kevindietrich)
mentioned this in
T43634: Selecting 'Drop Color' from spacebar menu causes instant close
.
Feb 11 2015, 11:51 PM
Log In to Comment