about summary refs log tree commit diff
path: root/src/engine/e_snapshot.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/e_snapshot.c')
-rw-r--r--src/engine/e_snapshot.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/engine/e_snapshot.c b/src/engine/e_snapshot.c
index d2379217..66b9a295 100644
--- a/src/engine/e_snapshot.c
+++ b/src/engine/e_snapshot.c
@@ -427,6 +427,10 @@ void snapstorage_purge_until(SNAPSTORAGE *ss, int tick)
 			return; /* no more to remove */
 		mem_free(h);
 		
+        // did we come to the end of the list?
+        if (!next)
+            break;
+
 		ss->first = next;
 		next->prev = 0x0;