Skip to content

Commit

Permalink
Checks if invAt is null in on_mouse_click() when player clicks on inv…
Browse files Browse the repository at this point in the history
…entory item to prevent game crash.
  • Loading branch information
ConeRX committed Oct 30, 2017
1 parent bdd4ecf commit bf6cf19
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion GlobalScript.asc
Original file line number Diff line number Diff line change
Expand Up @@ -1805,7 +1805,7 @@ function on_mouse_click (int button)
used_action = global_action;
if ( Mouse.Mode == 2 )
{
if (isAction (eActUse) && invAt.IsInteractionAvailable(eModeUseinv) == 1)
if (isAction (eActUse) && invAt != null && invAt.IsInteractionAvailable(eModeUseinv) == 1)
{
gAktionText.TextColor = ActionLabelColorHighlighted;
if ( invAt )
Expand Down

0 comments on commit bf6cf19

Please sign in to comment.