* alloc.c (check_string_bytes): If GC_CHECK_STRING_BYTES
authorDmitry Antipov <dmantipov@yandex.ru>
Tue, 3 Jul 2012 10:21:01 +0000 (14:21 +0400)
committerDmitry Antipov <dmantipov@yandex.ru>
Tue, 3 Jul 2012 10:21:01 +0000 (14:21 +0400)
is enabled, avoid dereferencing NULL current_sblock if
running undumped.

src/ChangeLog
src/alloc.c

index 6eb1a07..d0dfa13 100644 (file)
@@ -1,3 +1,9 @@
+2012-07-03  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * alloc.c (check_string_bytes): If GC_CHECK_STRING_BYTES
+       is enabled, avoid dereferencing NULL current_sblock if
+       running undumped.
+
 2012-07-03  Dmitry Antipov  <dmantipov@yandex.ru>
 
        Cleanup basic buffer management.
index b329f89..3306bc4 100644 (file)
@@ -1872,7 +1872,7 @@ check_string_bytes (int all_p)
       for (b = oldest_sblock; b; b = b->next)
        check_sblock (b);
     }
-  else
+  else if (current_sblock)
     check_sblock (current_sblock);
 }