diff options
Diffstat (limited to 'src/basic/bitmap.c')
-rw-r--r-- | src/basic/bitmap.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/basic/bitmap.c b/src/basic/bitmap.c index 95f59e400a..c8b2427b1c 100644 --- a/src/basic/bitmap.c +++ b/src/basic/bitmap.c @@ -140,7 +140,8 @@ bool bitmap_isset(Bitmap *b, unsigned n) { bool bitmap_isclear(Bitmap *b) { unsigned i; - assert(b); + if (!b) + return true; for (i = 0; i < b->n_bitmaps; i++) if (b->bitmaps[i] != 0) @@ -150,7 +151,9 @@ bool bitmap_isclear(Bitmap *b) { } void bitmap_clear(Bitmap *b) { - assert(b); + + if (!b) + return; b->bitmaps = mfree(b->bitmaps); b->n_bitmaps = 0; |