diff options
author | Joshua Leung <aligorith@gmail.com> | 2016-09-24 03:49:43 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2016-09-24 03:50:37 +0300 |
commit | bf2c2d43ef3ff955560a6b22be04c8860d0beabe (patch) | |
tree | aafbf4cb711f66b773ce8ae356e6a2223454ef60 /source/blender/editors/screen | |
parent | 36d0ea3123743e675333e90c712c69d666fe5710 (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
Diffstat (limited to 'source/blender/editors/screen')
-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; } } |