Skip to content

Commit

Permalink
fix null check (accidentally inverted conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
bhansconnect committed Sep 17, 2024
1 parent 3e423ce commit a7af7c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/roc_std_heap/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ impl<T> Heap<T> {
}

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 };
Expand Down

0 comments on commit a7af7c2

Please sign in to comment.