summaryrefslogtreecommitdiff
path: root/src/actions/windows.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-08-09 00:27:00 +0300
committerAndrei Karas <akaras@inbox.ru>2015-08-09 00:27:00 +0300
commit17a08b25c0df685e3f5c7edf1d4ab583f55ecaf9 (patch)
tree6b87b432ed5d87f1244316e18a614b326095e855 /src/actions/windows.cpp
parent9c46394f54db8c1b9e357ad555f3db96251a616d (diff)
downloadmv-17a08b25c0df685e3f5c7edf1d4ab583f55ecaf9.tar.gz
mv-17a08b25c0df685e3f5c7edf1d4ab583f55ecaf9.tar.bz2
mv-17a08b25c0df685e3f5c7edf1d4ab583f55ecaf9.tar.xz
mv-17a08b25c0df685e3f5c7edf1d4ab583f55ecaf9.zip
Add some missing checks to actions found by paranucker.
Diffstat (limited to 'src/actions/windows.cpp')
-rw-r--r--src/actions/windows.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/actions/windows.cpp b/src/actions/windows.cpp
index bd82521d4..c98adbfb0 100644
--- a/src/actions/windows.cpp
+++ b/src/actions/windows.cpp
@@ -273,7 +273,7 @@ impHandler0(questsWindowShow)
impHandler0(bankWindowShow)
{
#ifdef EATHENA_SUPPORT
- if (!serverFeatures->haveBankApi())
+ if (!serverFeatures || !serverFeatures->haveBankApi())
return false;
showHideWindow(bankWindow);
@@ -286,9 +286,10 @@ impHandler0(bankWindowShow)
impHandler0(cartWindowShow)
{
#ifdef EATHENA_SUPPORT
- if (!serverFeatures->haveCart()
- || !localPlayer
- || !localPlayer->getHaveCart())
+ if (!serverFeatures ||
+ !serverFeatures->haveCart() ||
+ !localPlayer ||
+ !localPlayer->getHaveCart())
{
return false;
}
@@ -316,9 +317,7 @@ impHandler0(quickWindowShow)
if (setupWindow)
{
if (setupWindow->isWindowVisible())
- {
setupWindow->doCancel();
- }
setupWindow->setVisible(Visible_true);
setupWindow->activateTab(_("Quick"));
setupWindow->requestMoveToTop();