aboutsummaryrefslogtreecommitdiff
path: root/editor/plugins/sprite_editor_plugin.cpp
diff options
context:
space:
mode:
authorChaosus2018-04-13 12:07:47 +0300
committerChaosus2018-04-18 16:45:39 +0300
commit026617b5fbc57e2494cb6f586917856e1cbf99c8 (patch)
tree9b34b54623d0edec6d63a266a47ca820c03d7e15 /editor/plugins/sprite_editor_plugin.cpp
parent3a5b25d5b489ad88c2861c9c37b56469580fbf03 (diff)
downloadgodot-026617b5fbc57e2494cb6f586917856e1cbf99c8.tar.gz
godot-026617b5fbc57e2494cb6f586917856e1cbf99c8.tar.zst
godot-026617b5fbc57e2494cb6f586917856e1cbf99c8.zip
Diffstat (limited to 'editor/plugins/sprite_editor_plugin.cpp')
-rw-r--r--editor/plugins/sprite_editor_plugin.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/editor/plugins/sprite_editor_plugin.cpp b/editor/plugins/sprite_editor_plugin.cpp
index 99aabcb3e..49816fe2a 100644
--- a/editor/plugins/sprite_editor_plugin.cpp
+++ b/editor/plugins/sprite_editor_plugin.cpp
@@ -80,6 +80,10 @@ Vector<Vector2> expand(const Vector<Vector2> &points, const Rect2i &rect, float
void SpriteEditor::_menu_option(int p_option) {
+ if (!node) {
+ return;
+ }
+
switch (p_option) {
case MENU_OPTION_CREATE_MESH_2D: {
@@ -389,6 +393,7 @@ SpriteEditorPlugin::SpriteEditorPlugin(EditorNode *p_node) {
editor = p_node;
sprite_editor = memnew(SpriteEditor);
editor->get_viewport()->add_child(sprite_editor);
+ make_visible(false);
//sprite_editor->options->hide();
}