diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-11-10 10:17:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-10 10:17:19 +0100 |
commit | 2143f46df26bde529db350f4b5965a6508385c2f (patch) | |
tree | d4bdab6220f7e24d7fad88087fb6c566bd6ff2b2 /editor/plugins | |
parent | 2fdeed1b4f3820bebf9f39d69eb8bd59e1c4f2f2 (diff) | |
parent | 7dda9309f91a71b9b3e2088f11bc322e3c15d669 (diff) |
Merge pull request #33516 from qarmin/small_fixes
Memory leaks and crash fixes
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(); + } } } |