Skip to content

Commit

Permalink
PINK: fixed clicking on empty part of screen
Browse files Browse the repository at this point in the history
  • Loading branch information
voltya authored and sev- committed Jun 28, 2018
1 parent 60d2c3e commit d0f0f41
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion engines/pink/objects/actors/lead_actor.cpp
Expand Up @@ -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();
Expand Down Expand Up @@ -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);
}

Expand Down

0 comments on commit d0f0f41

Please sign in to comment.