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:
authorBastien Montagne <montagne29@wanadoo.fr>2018-08-23 22:56:11 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-08-23 22:56:11 +0300
commit13ac92d057e5c916d170d000554ec000a3c30358 (patch)
tree072b5254674cc8540581eeab264c26a0e441bee9
parent4cde92303f3db9286b38d65d835db3e358b595f4 (diff)
Fix T55507: Crash due to GPencil brush icon management, when there is no active object.
-rw-r--r--source/blender/editors/interface/interface_icons.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c
index 4f77b797ec0..8816d6acec8 100644
--- a/source/blender/editors/interface/interface_icons.c
+++ b/source/blender/editors/interface/interface_icons.c
@@ -1636,7 +1636,7 @@ static int ui_id_brush_get_icon(const bContext *C, ID *id)
}
/* reset the icon */
- if (ob->mode & OB_MODE_GPENCIL_PAINT) {
+ if (ob != NULL && ob->mode & OB_MODE_GPENCIL_PAINT) {
switch (br->gpencil_settings->icon_id) {
case GP_BRUSH_ICON_PENCIL:
br->id.icon_id = ICON_GPBRUSH_PENCIL;