summaryrefslogtreecommitdiffstats
path: root/src/jrummikub
diff options
context:
space:
mode:
Diffstat (limited to 'src/jrummikub')
-rw-r--r--src/jrummikub/model/Table.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/jrummikub/model/Table.java b/src/jrummikub/model/Table.java
index a763bef..7787bea 100644
--- a/src/jrummikub/model/Table.java
+++ b/src/jrummikub/model/Table.java
@@ -28,6 +28,10 @@ public class Table extends StoneTray<StoneSet> implements ITable {
public Pair<StoneSet, StoneSet> pickUpStone(Stone stone) {
StoneInfo info = findStoneInfo(stone);
+ if (info == null) {
+ return null;
+ }
+
return splitSet(info.set, info.setPosition, info.stonePosition);
}