summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-08-29 17:24:52 +0300
committerAndrei Karas <akaras@inbox.ru>2011-08-29 17:24:52 +0300
commitfa57505d930970d38b5f1001f2bfac3a9a45795a (patch)
tree95b6b364a4b6b5c7346254d10dd15d9909c1bf12 /src/gui
parent71addab362fe436cfc32c77d437df6d662ef1630 (diff)
downloadmv-fa57505d930970d38b5f1001f2bfac3a9a45795a.tar.gz
mv-fa57505d930970d38b5f1001f2bfac3a9a45795a.tar.bz2
mv-fa57505d930970d38b5f1001f2bfac3a9a45795a.tar.xz
mv-fa57505d930970d38b5f1001f2bfac3a9a45795a.zip
Fix possible crashes in item amount window and spells editor.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/itemamountwindow.cpp2
-rw-r--r--src/gui/textcommandeditor.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/itemamountwindow.cpp b/src/gui/itemamountwindow.cpp
index a3f591634..059f3d785 100644
--- a/src/gui/itemamountwindow.cpp
+++ b/src/gui/itemamountwindow.cpp
@@ -63,7 +63,7 @@ public:
if (i->first < 0)
continue;
- ItemInfo info = (*i->second);
+ const ItemInfo &info = (*i->second);
std::string name = info.getName();
if (name != "unnamed" && !info.getName().empty()
&& info.getName() != "unnamed")
diff --git a/src/gui/textcommandeditor.cpp b/src/gui/textcommandeditor.cpp
index 8cf9fa398..9d759c4a2 100644
--- a/src/gui/textcommandeditor.cpp
+++ b/src/gui/textcommandeditor.cpp
@@ -71,7 +71,7 @@ public:
if (i->first < 0)
continue;
- ItemInfo info = (*i->second);
+ const ItemInfo &info = (*i->second);
std::string name = info.getName();
if (name != "unnamed" && !info.getName().empty()
&& info.getName() != "unnamed")