1
1

Fix T94387: Mesh sequence cache, crash when clicking a panel

The crash happens when opening a panel (added in rB43f5e761a66e87fed664a199cda867639f8daf3e)
when no CacheFile is set in the modifier.

To fix this, check that the CacheFile pointer is not null before attempting to draw anything.
This commit is contained in:
2021-12-26 13:45:13 +01:00
parent dd3a72f275
commit 28a8d434d5

View File

@@ -343,6 +343,10 @@ static void velocity_panel_draw(const bContext *UNUSED(C), Panel *panel)
return;
}
if (RNA_pointer_is_null(&fileptr)) {
return;
}
uiLayoutSetPropSep(layout, true);
uiTemplateCacheFileVelocity(layout, &fileptr);
uiItemR(layout, ptr, "velocity_scale", 0, NULL, ICON_NONE);
@@ -360,6 +364,10 @@ static void time_panel_draw(const bContext *UNUSED(C), Panel *panel)
return;
}
if (RNA_pointer_is_null(&fileptr)) {
return;
}
uiLayoutSetPropSep(layout, true);
uiTemplateCacheFileTimeSettings(layout, &fileptr);
}
@@ -376,6 +384,10 @@ static void render_procedural_panel_draw(const bContext *C, Panel *panel)
return;
}
if (RNA_pointer_is_null(&fileptr)) {
return;
}
uiLayoutSetPropSep(layout, true);
uiTemplateCacheFileProcedural(layout, C, &fileptr);
}