Page MenuHome

Selecting 'Drop Color' from spacebar menu causes instant close
Closed, ResolvedPublic

Description

System Information
Windows 64-bit, nvidia gtx570

Blender Version
Broken: 2.73a, 4ae6d58 (latest win-64 build)
Worked: -

Short description of error

Selecting 'Drop Color' from spacebar menu in 3D view causes blender to instantly close. (Not actually sure what 'drop color' actually is, just came across it).

Exact steps for others to reproduce the error

  1. Press spacebar on keyboard while in 3D view and type 'drop'.
  2. Select 'Drop color' from list.

Event Timeline

Ray Mairlot (madog) updated the task description. (Show Details)
Ray Mairlot (madog) raised the priority of this task from to Needs Triage by Developer.
Ray Mairlot (madog) set Type to Bug.

I confirm the crash.

It makes no sense to access this operator from search.
It is the drop from drag 'n drop.
Drop Color is explicit message shown when you drag 'n drop a color from one color slot to another.

Here's a quick patch:

1diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
2index 5cfbd16..3a9ba0c 100644
3--- a/source/blender/editors/sculpt_paint/paint_image.c
4+++ b/source/blender/editors/sculpt_paint/paint_image.c
5@@ -1492,16 +1492,20 @@ void PAINT_OT_brush_colors_flip(wmOperatorType *ot)
6 void ED_imapaint_bucket_fill(struct bContext *C, float color[3], wmOperator *op)
7 {
8 SpaceImage *sima = CTX_wm_space_image(C);
9- Image *ima = sima->image;
10+ Image *ima = NULL;
11
12- ED_undo_paint_push_begin(UNDO_PAINT_IMAGE, op->type->name,
13- ED_image_undo_restore, ED_image_undo_free, NULL);
14+ if (sima) {
15+ ima = sima->image;
16
17- paint_2d_bucket_fill(C, color, NULL, NULL, NULL);
18+ ED_undo_paint_push_begin(UNDO_PAINT_IMAGE, op->type->name,
19+ ED_image_undo_restore, ED_image_undo_free, NULL);
20
21- ED_undo_paint_push_end(UNDO_PAINT_IMAGE);
22+ paint_2d_bucket_fill(C, color, NULL, NULL, NULL);
23
24- DAG_id_tag_update(&ima->id, 0);
25+ ED_undo_paint_push_end(UNDO_PAINT_IMAGE);
26+
27+ DAG_id_tag_update(&ima->id, 0);
28+ }
29 }
30
31