Fix T80993: Crash duplicating inactive workspace
We need to check for the property editor's runtime struct before duplicating it.
This commit is contained in:
@@ -132,8 +132,10 @@ static SpaceLink *buttons_duplicate(SpaceLink *sl)
|
||||
/* clear or remove stuff from old */
|
||||
sbutsn->path = NULL;
|
||||
sbutsn->texuser = NULL;
|
||||
sbutsn->runtime = MEM_dupallocN(sfile_old->runtime);
|
||||
sbutsn->runtime->search_string[0] = '\0';
|
||||
if (sfile_old->runtime != NULL) {
|
||||
sbutsn->runtime = MEM_dupallocN(sfile_old->runtime);
|
||||
sbutsn->runtime->search_string[0] = '\0';
|
||||
}
|
||||
|
||||
return (SpaceLink *)sbutsn;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user