summaryrefslogtreecommitdiff
path: root/src/gui/windows
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/windows')
-rw-r--r--src/gui/windows/confirmdialog.h2
-rw-r--r--src/gui/windows/editdialog.h2
-rw-r--r--src/gui/windows/inventorywindow.h4
-rw-r--r--src/gui/windows/skilldialog.cpp2
-rw-r--r--src/gui/windows/skilldialog.h8
5 files changed, 10 insertions, 8 deletions
diff --git a/src/gui/windows/confirmdialog.h b/src/gui/windows/confirmdialog.h
index 2b3951dad..91132b641 100644
--- a/src/gui/windows/confirmdialog.h
+++ b/src/gui/windows/confirmdialog.h
@@ -64,7 +64,7 @@ class ConfirmDialog notfinal : public Window,
void postInit() override final;
private:
- TextBox *mTextBox;
+ TextBox *mTextBox A_NONNULLPOINTER;
bool mIgnore;
};
diff --git a/src/gui/windows/editdialog.h b/src/gui/windows/editdialog.h
index ef77fcdcd..f76b163b7 100644
--- a/src/gui/windows/editdialog.h
+++ b/src/gui/windows/editdialog.h
@@ -66,7 +66,7 @@ class EditDialog final : public Window,
private:
std::string mEventOk;
- TextField *mTextField;
+ TextField *mTextField A_NONNULLPOINTER;
};
#endif // GUI_WINDOWS_EDITDIALOG_H
diff --git a/src/gui/windows/inventorywindow.h b/src/gui/windows/inventorywindow.h
index 062ac6bce..eca01ab05 100644
--- a/src/gui/windows/inventorywindow.h
+++ b/src/gui/windows/inventorywindow.h
@@ -128,7 +128,7 @@ class InventoryWindow final : public Window,
void slotsChanged(Inventory *const inventory) override final;
bool isMainInventory() const A_WARN_UNUSED
- { return mInventory->isMainInventory(); }
+ { return mInventory ? mInventory->isMainInventory() : false; }
/**
* Returns true if any instances exist.
@@ -174,7 +174,7 @@ class InventoryWindow final : public Window,
static WindowList invInstances;
Inventory *mInventory;
- ItemContainer *mItems;
+ ItemContainer *mItems A_NONNULLPOINTER;
Button *mUseButton;
Button *mDropButton;
diff --git a/src/gui/windows/skilldialog.cpp b/src/gui/windows/skilldialog.cpp
index 89b614e8d..9c1cbc618 100644
--- a/src/gui/windows/skilldialog.cpp
+++ b/src/gui/windows/skilldialog.cpp
@@ -115,6 +115,8 @@ void SkillDialog::action(const ActionEvent &event)
const std::string &eventId = event.getId();
if (eventId == "inc")
{
+ if (!playerHandler)
+ return;
const SkillTab *const tab = static_cast<const SkillTab *const>(
mTabs->getSelectedTab());
if (tab)
diff --git a/src/gui/windows/skilldialog.h b/src/gui/windows/skilldialog.h
index 7c8329ce9..29cc69165 100644
--- a/src/gui/windows/skilldialog.h
+++ b/src/gui/windows/skilldialog.h
@@ -145,11 +145,11 @@ class SkillDialog final : public Window,
typedef std::map<int, SkillInfo*> SkillMap;
SkillMap mSkills;
std::vector<SkillInfo*> mDurations;
- TabbedArea *mTabs;
+ TabbedArea *mTabs A_NONNULLPOINTER;
std::list<Tab*> mDeleteTabs;
- Label *mPointsLabel;
- Button *mUseButton;
- Button *mIncreaseButton;
+ Label *mPointsLabel A_NONNULLPOINTER;
+ Button *mUseButton A_NONNULLPOINTER;
+ Button *mIncreaseButton A_NONNULLPOINTER;
SkillModel *mDefaultModel;
};