diff options
Diffstat (limited to 'editor/plugins')
-rw-r--r-- | editor/plugins/canvas_item_editor_plugin.cpp | 1 | ||||
-rw-r--r-- | editor/plugins/editor_preview_plugins.cpp | 8 |
2 files changed, 6 insertions, 3 deletions
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index c9dde5d54d..1b263fa4f6 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -5247,6 +5247,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { snap_other_nodes = true; snap_guides = true; snap_rotation = false; + snap_scale = false; snap_relative = false; snap_pixel = false; snap_target[0] = SNAP_TARGET_NONE; diff --git a/editor/plugins/editor_preview_plugins.cpp b/editor/plugins/editor_preview_plugins.cpp index 8acc41a2c7..007ce58bd7 100644 --- a/editor/plugins/editor_preview_plugins.cpp +++ b/editor/plugins/editor_preview_plugins.cpp @@ -103,9 +103,11 @@ Ref<Texture> EditorTexturePreviewPlugin::generate(const RES &p_from, const Size2 img = ltex->to_image(); } else { Ref<Texture> tex = p_from; - img = tex->get_data(); - if (img.is_valid()) { - img = img->duplicate(); + if (tex.is_valid()) { + img = tex->get_data(); + if (img.is_valid()) { + img = img->duplicate(); + } } } |