Skip to content

Commit

Permalink
Check for null outcome associated with a strategic game contingency.
Browse files Browse the repository at this point in the history
  • Loading branch information
tturocy committed Nov 9, 2023
1 parent 3ff06e2 commit d32b8b4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/pygambit/game.pxi
Original file line number Diff line number Diff line change
Expand Up @@ -571,11 +571,11 @@ class Game:
else:
outcome = Outcome()
outcome.outcome = deref(psp).deref().GetOutcome()
return outcome
if outcome.outcome != cython.cast(c_GameOutcome, NULL):
return outcome
else:
return None

# As of Cython 0.11.2, cython does not support the * notation for the argument
# to __getitem__, which is required for multidimensional slicing to work.
# We work around this by providing a shim.
def __getitem__(self, i):
"""Returns the `Outcome` associated with a profile of pure strategies.
"""
Expand Down

0 comments on commit d32b8b4

Please sign in to comment.