diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-06-24 14:55:44 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-06-25 20:06:07 +0300 |
commit | 9d521a19be347703bfdbb7802d0397a59c3edd7a (patch) | |
tree | 9a4e56edc84d5cfd8ebaea17fa19296c51e1e661 /src/gui/windows/itemamountwindow.cpp | |
parent | 841fe55e67ea467a8e2192dee5c169d282a35148 (diff) | |
download | plus-9d521a19be347703bfdbb7802d0397a59c3edd7a.tar.gz plus-9d521a19be347703bfdbb7802d0397a59c3edd7a.tar.bz2 plus-9d521a19be347703bfdbb7802d0397a59c3edd7a.tar.xz plus-9d521a19be347703bfdbb7802d0397a59c3edd7a.zip |
Add missing checks in windows.
Diffstat (limited to 'src/gui/windows/itemamountwindow.cpp')
-rw-r--r-- | src/gui/windows/itemamountwindow.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gui/windows/itemamountwindow.cpp b/src/gui/windows/itemamountwindow.cpp index 07c7d52a1..3a1892f00 100644 --- a/src/gui/windows/itemamountwindow.cpp +++ b/src/gui/windows/itemamountwindow.cpp @@ -59,6 +59,8 @@ void ItemAmountWindow::finish(const Item *const item, const int price, const Usage usage) { + if (!item) + return; switch (usage) { case TradeAdd: @@ -106,8 +108,10 @@ void ItemAmountWindow::finish(const Item *const item, } } -ItemAmountWindow::ItemAmountWindow(const Usage usage, Window *const parent, - Item *const item, const int maxRange) : +ItemAmountWindow::ItemAmountWindow(const Usage usage, + Window *const parent, + Item *const item, + const int maxRange) : Window("", Modal_false, parent, "amount.xml"), ActionListener(), KeyListener(), |