From 7662138decfd4ee701a3d0e17accf5a2bbbc5cec 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. --- 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; } }