diff --git a/crates/roc_std_heap/src/lib.rs b/crates/roc_std_heap/src/lib.rs index 0dc8af1a0b..1af5dcc899 100644 --- a/crates/roc_std_heap/src/lib.rs +++ b/crates/roc_std_heap/src/lib.rs @@ -170,7 +170,7 @@ impl Heap { } pub fn alloc(&mut self) -> Result<*mut T> { - if self.free_list.is_null() { + if !self.free_list.is_null() { // Open slot on the free list. let root = self.free_list as *const *const c_void; let next = unsafe { *root };