diff options
author | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2022-02-14 18:13:25 +0300 |
---|---|---|
committer | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2022-02-14 18:13:25 +0300 |
commit | 0999a01b03d4ee727ff73661ec35c8c169926689 (patch) | |
tree | 9bed84a9f9841f3e128558b684854f218506867f /source/blender/modifiers | |
parent | 65d4c58060eae4f544e4e483a38ca2b8d30bd707 (diff) |
Fix T95320: CacheFile templates crash when used through Python
The crash is caused as we did not check that the RNA pointer is null
before trying to use it. This moves the existing checks from the
modifier panels into the template functions so the logic is a bit
centralized.
Diffstat (limited to 'source/blender/modifiers')
-rw-r--r-- | source/blender/modifiers/intern/MOD_meshsequencecache.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/source/blender/modifiers/intern/MOD_meshsequencecache.c b/source/blender/modifiers/intern/MOD_meshsequencecache.c index b5dd0566215..1d3699e41ec 100644 --- a/source/blender/modifiers/intern/MOD_meshsequencecache.c +++ b/source/blender/modifiers/intern/MOD_meshsequencecache.c @@ -343,10 +343,6 @@ 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); @@ -364,10 +360,6 @@ 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); } @@ -384,10 +376,6 @@ 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); } @@ -404,10 +392,6 @@ static void override_layers_panel_draw(const bContext *C, Panel *panel) return; } - if (RNA_pointer_is_null(&fileptr)) { - return; - } - uiLayoutSetPropSep(layout, true); uiTemplateCacheFileLayers(layout, C, &fileptr); } |