aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorwhiterandrek2018-06-21 10:58:56 +0300
committerEugene Sandulenko2018-06-28 23:51:32 +0200
commitd0f0f4185746fc2b5020dbf0adc0103ce589f848 (patch)
tree1d2ceb077394056cdf8d727f8e93daea500970ca /engines
parent60d2c3e2f216a7a634d716508e159b8a08361417 (diff)
downloadscummvm-rg350-d0f0f4185746fc2b5020dbf0adc0103ce589f848.tar.gz
scummvm-rg350-d0f0f4185746fc2b5020dbf0adc0103ce589f848.tar.bz2
scummvm-rg350-d0f0f4185746fc2b5020dbf0adc0103ce589f848.zip
PINK: fixed clicking on empty part of screen
Diffstat (limited to 'engines')
-rw-r--r--engines/pink/objects/actors/lead_actor.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/engines/pink/objects/actors/lead_actor.cpp b/engines/pink/objects/actors/lead_actor.cpp
index 82cf174192..17f1cacb1b 100644
--- a/engines/pink/objects/actors/lead_actor.cpp
+++ b/engines/pink/objects/actors/lead_actor.cpp
@@ -209,6 +209,8 @@ void LeadActor::onLeftButtonClick(const Common::Point point) {
case kReady:
case kMoving: {
Actor *clickedActor = getActorByPoint(point);
+ if (!clickedActor)
+ return;
if (this == clickedActor) {
_audioInfoMgr.stop();
@@ -241,7 +243,7 @@ void LeadActor::onLeftButtonClick(const Common::Point point) {
void LeadActor::onRightButtonClick(const Common::Point point) {
if (_state == kReady || _state == kMoving) {
Actor *clickedActor = getActorByPoint(point);
- if (isInteractingWith(clickedActor)) {
+ if (clickedActor && isInteractingWith(clickedActor)) {
_audioInfoMgr.start(clickedActor);
}