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
This commit is contained in:
Joshua Leung 2016-09-24 12:49:43 +12:00 committed by Sergey Sharybin
parent 08d14a86d4
commit 4ed7fb581a
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}
}