aboutsummaryrefslogtreecommitdiff
path: root/src/common.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/common.cpp')
-rw-r--r--src/common.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common.cpp b/src/common.cpp
index 2a0cd8371..02d4f4866 100644
--- a/src/common.cpp
+++ b/src/common.cpp
@@ -33,7 +33,7 @@ i64 next_pow2(i64 n) {
}
-#define gb_for_array(index_, array_) for (isize index_ = 0; index_ < gb_array_count(array_); index_++)
+#define gb_for_array(index_, array_) for (isize index_ = 0; (array_) != NULL && index_ < gb_array_count(array_); index_++)
// Doubly Linked Lists