Skip to content

Commit

Permalink
Fix crash in texture previeer, closes #26749, probably others
Browse files Browse the repository at this point in the history
  • Loading branch information
reduz committed Mar 8, 2019
1 parent 241a85d commit 95c6d9c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions editor/plugins/texture_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {

Expand Down
1 change: 1 addition & 0 deletions editor/plugins/texture_editor_plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ class TextureEditor : public Control {
public:
void edit(Ref<Texture> p_texture);
TextureEditor();
~TextureEditor();
};

class EditorInspectorPluginTexture : public EditorInspectorPlugin {
Expand Down

0 comments on commit 95c6d9c

Please sign in to comment.