Fix T49023: Segfault when switching brushes while renaming another brush.

rna_GPencilBrush_name_set() was trying to use a mere bGPDbrush as a complete ToolSettings,
was doomed to fail...
This commit is contained in:
Bastien Montagne
2016-08-05 23:33:22 +02:00
parent 8adcd93769
commit df7be61438

View File

@@ -542,7 +542,7 @@ static void rna_GPencilBrush_index_range(PointerRNA *ptr, int *min, int *max, in
static void rna_GPencilBrush_name_set(PointerRNA *ptr, const char *value)
{
ToolSettings *ts = (ToolSettings *) ptr->data;
ToolSettings *ts = ((Scene *) ptr->id.data)->toolsettings;
bGPDbrush *brush = ptr->data;
/* copy the new name into the name slot */