v0.6.5a: added a safety check to pickup up from heaps

This commit is contained in:
Evan Debenham 2018-05-04 16:10:45 -04:00
parent 9ff7f89e0f
commit eb0dd4b47c

View File

@ -160,6 +160,10 @@ public class Heap implements Bundlable {
public Item pickUp() {
if (items.isEmpty()){
destroy();
return null;
}
Item item = items.removeFirst();
if (items.isEmpty()) {
destroy();