summaryrefslogtreecommitdiff
path: root/src/gui/npcdialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/npcdialog.cpp')
-rw-r--r--src/gui/npcdialog.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/npcdialog.cpp b/src/gui/npcdialog.cpp
index 248a5f33..16b584f3 100644
--- a/src/gui/npcdialog.cpp
+++ b/src/gui/npcdialog.cpp
@@ -347,6 +347,9 @@ void NpcDialog::setVisible(bool visible)
NpcDialog *NpcDialog::getActive()
{
+ if (instances.size() == 1)
+ return instances.front();
+
DialogList::iterator it = instances.begin();
DialogList::iterator it_end = instances.end();