From 4ead5c9f65ffbf1de9b0cb60cae06b116badbced Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 2 Feb 2011 22:15:55 +0200 Subject: Close npc and other dialogs if reconnecting. Also save extra layers if network error. --- src/gui/npcdialog.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/gui/npcdialog.cpp') diff --git a/src/gui/npcdialog.cpp b/src/gui/npcdialog.cpp index 3af0594f6..4fe5bf8ab 100644 --- a/src/gui/npcdialog.cpp +++ b/src/gui/npcdialog.cpp @@ -149,7 +149,6 @@ NpcDialog::~NpcDialog() mMinusButton = 0; instances.remove(this); - } void NpcDialog::setText(const std::string &text) @@ -418,7 +417,10 @@ void NpcDialog::closeAll() DialogList::iterator it_end = instances.end(); for (; it != it_end; ++it) - (*it)->close(); + { + if (*it) + (*it)->close(); + } } void NpcDialog::buildLayout() -- cgit v1.2.3-60-g2f50