ソースを参照

add NULL check (#1925)

atticus 4 年 前
コミット
6d20430ccc
1 ファイル変更1 行追加0 行削除
  1. 1 0
      src/extras/rmem.h

+ 1 - 0
src/extras/rmem.h

@@ -276,6 +276,7 @@ static void __InsertMemNode(MemPool *const mempool, AllocList *const list, MemNo
                 mempool->arena.offs += iter->size;
                 __RemoveMemNode(list, iter);
                 iter = list->head;
+                if (iter == NULL) return;
             }
             const uintptr_t inode = ( uintptr_t )node;
             const uintptr_t iiter = ( uintptr_t )iter;