diff options
Diffstat (limited to 'editor/plugins')
-rw-r--r-- | editor/plugins/texture_editor_plugin.cpp | 5 | ||||
-rw-r--r-- | editor/plugins/texture_editor_plugin.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/editor/plugins/texture_editor_plugin.cpp b/editor/plugins/texture_editor_plugin.cpp index 6f9c9fa040..0aa4a7662c 100644 --- a/editor/plugins/texture_editor_plugin.cpp +++ b/editor/plugins/texture_editor_plugin.cpp @@ -138,6 +138,11 @@ TextureEditor::TextureEditor() { set_custom_minimum_size(Size2(1, 150)); } +TextureEditor::~TextureEditor() { + if (!texture.is_null()) { + texture->remove_change_receptor(this); + } +} // bool EditorInspectorPluginTexture::can_handle(Object *p_object) { diff --git a/editor/plugins/texture_editor_plugin.h b/editor/plugins/texture_editor_plugin.h index 9c7d33df5a..bcbda1fbd7 100644 --- a/editor/plugins/texture_editor_plugin.h +++ b/editor/plugins/texture_editor_plugin.h @@ -50,6 +50,7 @@ protected: public: void edit(Ref<Texture> p_texture); TextureEditor(); + ~TextureEditor(); }; class EditorInspectorPluginTexture : public EditorInspectorPlugin { |