From 4ddde5f4fa3f4b77c2ddf1d4848d06628d396842 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 12 Apr 2013 02:11:25 +0300 Subject: fix random rare crashes in npc and possible other windows. --- src/gui/widgets/textbox.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/gui/widgets/textbox.cpp') diff --git a/src/gui/widgets/textbox.cpp b/src/gui/widgets/textbox.cpp index 69c93c025..dec73768e 100644 --- a/src/gui/widgets/textbox.cpp +++ b/src/gui/widgets/textbox.cpp @@ -41,6 +41,12 @@ TextBox::TextBox(const Widget2 *const widget) : setFrameSize(0); } +TextBox::~TextBox() +{ + if (gui) + gui->removeDragged(this); +} + void TextBox::setTextWrapped(const std::string &text, const int minDimension) { // Make sure parent scroll area sets width of this widget -- cgit v1.2.3-70-g09d2