From 5bd77c58b5ffa4831fb4c12e59d123c5dd68d8bc Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Fri, 8 Mar 2013 06:07:21 +0100 Subject: [PATCH] MODIFIED: Widgets derived from CInterfaceGroup should now be deleted too properly. --- .../src/plugins/gui_editor/editor_message_processor.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.cpp index 36e3481e0..28cc7d75b 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.cpp @@ -41,9 +41,9 @@ namespace GUIEditor if( e == NULL ) return; - CInterfaceElement *p = e; - while( ( p != NULL ) && !p->isGroup() ) - p = p->getParent(); + CInterfaceElement *p = e->getParent(); + if( p == NULL ) + return; CInterfaceGroup *g = dynamic_cast< CInterfaceGroup* >( p ); if( g == NULL )