diff options
author | Joshua Leung <aligorith@gmail.com> | 2016-09-24 03:49:43 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-09-26 11:51:50 +0300 |
commit | 4ed7fb581a59657888d55b950879db0a44e4dcde (patch) | |
tree | 257608d250f5cf68a5f3001989700199896a38f4 | |
parent | 08d14a86d49b02dabc571b783d5ca5ed1f067562 (diff) |
Fix T49441: Grease Pencil - pie menu - brush name field crashes blender
Using context.active_gpencil_brush to access the active Grease Pencil brush
would result in a crash if trying to rename the brush, because the "ID" pointer
was not set.
To be backported to 2.78
-rw-r--r-- | source/blender/editors/screen/screen_context.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/screen/screen_context.c b/source/blender/editors/screen/screen_context.c index 34c51914027..c165bbfd301 100644 --- a/source/blender/editors/screen/screen_context.c +++ b/source/blender/editors/screen/screen_context.c @@ -509,7 +509,7 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult bGPDbrush *brush = BKE_gpencil_brush_getactive(scene->toolsettings); if (brush) { - CTX_data_pointer_set(result, NULL, &RNA_GPencilBrush, brush); + CTX_data_pointer_set(result, &scene->id, &RNA_GPencilBrush, brush); return 1; } } |