summaryrefslogtreecommitdiffstats
path: root/editor/plugins/texture_editor_plugin.cpp
diff options
context:
space:
mode:
authorkobewi <kobewi4e@gmail.com>2021-07-23 16:29:49 +0200
committerkobewi <kobewi4e@gmail.com>2021-07-23 16:29:49 +0200
commit2846dbf239128baced33a9d5ecd18ef04b51a142 (patch)
treef1497138bc15a2e477778a81b503ed2a7039143b /editor/plugins/texture_editor_plugin.cpp
parent8cddd3b2c04aceb040b8e862ec1bae904b6842e6 (diff)
downloadredot-engine-2846dbf239128baced33a9d5ecd18ef04b51a142.tar.gz
Don't set metadata_label font if it doesn't exist
Diffstat (limited to 'editor/plugins/texture_editor_plugin.cpp')
-rw-r--r--editor/plugins/texture_editor_plugin.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/editor/plugins/texture_editor_plugin.cpp b/editor/plugins/texture_editor_plugin.cpp
index 2eee9b8de3..44db06bcfd 100644
--- a/editor/plugins/texture_editor_plugin.cpp
+++ b/editor/plugins/texture_editor_plugin.cpp
@@ -48,8 +48,10 @@ void TexturePreview::_notification(int p_what) {
break;
}
- Ref<Font> metadata_label_font = get_theme_font(SNAME("expression"), SNAME("EditorFonts"));
- metadata_label->add_theme_font_override("font", metadata_label_font);
+ if (metadata_label) {
+ Ref<Font> metadata_label_font = get_theme_font(SNAME("expression"), SNAME("EditorFonts"));
+ metadata_label->add_theme_font_override("font", metadata_label_font);
+ }
checkerboard->set_texture(get_theme_icon(SNAME("Checkerboard"), SNAME("EditorIcons")));
} break;