Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKévin Dietrich <kevin.dietrich@mailoo.org>2021-12-26 15:45:13 +0300
committerKévin Dietrich <kevin.dietrich@mailoo.org>2021-12-26 15:45:49 +0300
commit28a8d434d53126c09ee795c5b8af129e3fc7521a (patch)
tree9bef0b5dbfad77cee686b9459381dafe792ac728 /source/blender/modifiers
parentdd3a72f275b3dfed3c6529d7ede48875149dc186 (diff)
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.
Diffstat (limited to 'source/blender/modifiers')
-rw-r--r--source/blender/modifiers/intern/MOD_meshsequencecache.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/modifiers/intern/MOD_meshsequencecache.c b/source/blender/modifiers/intern/MOD_meshsequencecache.c
index 6982f95ef8d..00f39e58b4d 100644
--- a/source/blender/modifiers/intern/MOD_meshsequencecache.c
+++ b/source/blender/modifiers/intern/MOD_meshsequencecache.c
@@ -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);
}