From f4d47f27aa3807e62d25be386b224ded8dac093c Mon Sep 17 00:00:00 2001 From: Nimetu Date: Tue, 22 Dec 2015 01:29:53 +0200 Subject: [PATCH] Fixed: Crash when div was following p element --HG-- branch : develop --- code/nel/src/gui/group_html.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/code/nel/src/gui/group_html.cpp b/code/nel/src/gui/group_html.cpp index 0396051ac..d432efb01 100644 --- a/code/nel/src/gui/group_html.cpp +++ b/code/nel/src/gui/group_html.cpp @@ -1190,7 +1190,12 @@ namespace NLGUI if (haveParentDiv) parentId = getDiv()->getId(); else + { + if (!_Paragraph) + newParagraph (0); + parentId = _Paragraph->getId(); + } CInterfaceGroup *inst = CWidgetManager::getInstance()->getParser()->createGroupInstance(templateName, parentId+":"+id, tmplParams); if (inst) @@ -1210,12 +1215,6 @@ namespace NLGUI } else { - if (!_Paragraph) - { - newParagraph (0); - paragraphChange (); - } - getParagraph()->addChild(inst); paragraphChange(); }