summaryrefslogtreecommitdiff
path: root/src/gui/npcdialog.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-02-02 22:15:55 +0200
committerAndrei Karas <akaras@inbox.ru>2011-02-02 22:15:55 +0200
commit4ead5c9f65ffbf1de9b0cb60cae06b116badbced (patch)
treebc94093b90e7b4d3168259b7404ae2f6236f3925 /src/gui/npcdialog.cpp
parent4b0caea6389ab789ff3ae3a267b9002f8a21e8c3 (diff)
downloadmv-4ead5c9f65ffbf1de9b0cb60cae06b116badbced.tar.gz
mv-4ead5c9f65ffbf1de9b0cb60cae06b116badbced.tar.bz2
mv-4ead5c9f65ffbf1de9b0cb60cae06b116badbced.tar.xz
mv-4ead5c9f65ffbf1de9b0cb60cae06b116badbced.zip
Close npc and other dialogs if reconnecting.
Also save extra layers if network error.
Diffstat (limited to 'src/gui/npcdialog.cpp')
-rw-r--r--src/gui/npcdialog.cpp6
1 files changed, 4 insertions, 2 deletions
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()