aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--saga/interface.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/saga/interface.cpp b/saga/interface.cpp
index 08b54e37a1..b090294130 100644
--- a/saga/interface.cpp
+++ b/saga/interface.cpp
@@ -553,8 +553,10 @@ void Interface::handleCommandUpdate(const Point& mousePoint) {
if (!_vm->mouseButtonPressed()) { // remove pressed flag
- _inventoryUpButton->state = 0;
- _inventoryDownButton->state = 0;
+ if (_inventoryUpButton) {
+ _inventoryUpButton->state = 0;
+ _inventoryDownButton->state = 0;
+ }
}
panelButton = _mainPanel.hitTest(mousePoint, kPanelAllButtons);
@@ -975,8 +977,10 @@ void Interface::handleConverseUpdate(const Point& mousePoint) {
PanelButton *last = _conversePanel.currentButton;
if (!_vm->mouseButtonPressed()) { // remove pressed flag
- _converseUpButton->state = 0;
- _converseDownButton->state = 0;
+ if (_converseUpButton) {
+ _converseUpButton->state = 0;
+ _converseDownButton->state = 0;
+ }
}
_conversePanel.currentButton = converseHitTest(mousePoint);