diff options
Diffstat (limited to 'src/alloc.c')
| -rw-r--r-- | src/alloc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/alloc.c b/src/alloc.c index fe13b84b5a7..574196059f8 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -3618,9 +3618,9 @@ mem_insert (start, end, type) | |||
| 3618 | { | 3618 | { |
| 3619 | struct mem_node *c, *parent, *x; | 3619 | struct mem_node *c, *parent, *x; |
| 3620 | 3620 | ||
| 3621 | if (start < min_heap_address) | 3621 | if (min_heap_address == NULL || start < min_heap_address) |
| 3622 | min_heap_address = start; | 3622 | min_heap_address = start; |
| 3623 | if (end > max_heap_address) | 3623 | if (max_heap_address == NULL || end > max_heap_address) |
| 3624 | max_heap_address = end; | 3624 | max_heap_address = end; |
| 3625 | 3625 | ||
| 3626 | /* See where in the tree a node for START belongs. In this | 3626 | /* See where in the tree a node for START belongs. In this |