diff options
Diffstat (limited to 'source/blender/editors/interface/interface_templates.c')
-rw-r--r-- | source/blender/editors/interface/interface_templates.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 9c9759aea71..2b7ca1f8b71 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -6329,6 +6329,10 @@ void uiTemplateNodeSocket(uiLayout *layout, bContext *UNUSED(C), float color[4]) void uiTemplateCacheFileVelocity(uiLayout *layout, PointerRNA *fileptr) { + if (RNA_pointer_is_null(fileptr)) { + return; + } + /* Ensure that the context has a CacheFile as this may not be set inside of modifiers panels. */ uiLayoutSetContextPointer(layout, "edit_cachefile", fileptr); @@ -6338,6 +6342,10 @@ void uiTemplateCacheFileVelocity(uiLayout *layout, PointerRNA *fileptr) void uiTemplateCacheFileProcedural(uiLayout *layout, const bContext *C, PointerRNA *fileptr) { + if (RNA_pointer_is_null(fileptr)) { + return; + } + /* Ensure that the context has a CacheFile as this may not be set inside of modifiers panels. */ uiLayoutSetContextPointer(layout, "edit_cachefile", fileptr); @@ -6384,6 +6392,10 @@ void uiTemplateCacheFileProcedural(uiLayout *layout, const bContext *C, PointerR void uiTemplateCacheFileTimeSettings(uiLayout *layout, PointerRNA *fileptr) { + if (RNA_pointer_is_null(fileptr)) { + return; + } + /* Ensure that the context has a CacheFile as this may not be set inside of modifiers panels. */ uiLayoutSetContextPointer(layout, "edit_cachefile", fileptr); @@ -6434,6 +6446,10 @@ uiListType *UI_UL_cache_file_layers() void uiTemplateCacheFileLayers(uiLayout *layout, const bContext *C, PointerRNA *fileptr) { + if (RNA_pointer_is_null(fileptr)) { + return; + } + /* Ensure that the context has a CacheFile as this may not be set inside of modifiers panels. */ uiLayoutSetContextPointer(layout, "edit_cachefile", fileptr); |