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:
Diffstat (limited to 'source/blender/editors/interface/interface_draw.c')
-rw-r--r--source/blender/editors/interface/interface_draw.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c
index 1ed43697cd1..6cd274c8b15 100644
--- a/source/blender/editors/interface/interface_draw.c
+++ b/source/blender/editors/interface/interface_draw.c
@@ -1639,7 +1639,9 @@ void ui_draw_but_COLORBAND(uiBut *but, const uiWidgetColors *UNUSED(wcol), const
struct ColorManagedDisplay *display = ui_block_cm_display_get(but->block);
uint pos_id, col_id;
- ColorBand *coba = (ColorBand *)(but->editcoba ? but->editcoba : but->poin);
+ uiButColorBand *but_coba = (uiButColorBand *)but;
+ ColorBand *coba = (but_coba->edit_coba == NULL) ? (ColorBand *)but->poin : but_coba->edit_coba;
+
if (coba == NULL) {
return;
}