From 20820697a3f6702cd6243698013b09a82220691b Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Sat, 9 Mar 2013 20:58:53 +0100 Subject: [PATCH] FIXED: It's not nice to leak memory. --HG-- branch : gsoc2012-gui-editor --- code/nel/src/gui/ctrl_text_button.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/nel/src/gui/ctrl_text_button.cpp b/code/nel/src/gui/ctrl_text_button.cpp index 744086c38..76fa3e02d 100644 --- a/code/nel/src/gui/ctrl_text_button.cpp +++ b/code/nel/src/gui/ctrl_text_button.cpp @@ -66,6 +66,9 @@ namespace NLGUI { if( _Parent != NULL ) _Parent->delView( _ViewText ); + else + delete _ViewText; + _ViewText = NULL; } }