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 f847b4052b7..6c757567354 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -3572,9 +3572,9 @@ mem_insert (start, end, type) | |||
| 3572 | { | 3572 | { |
| 3573 | struct mem_node *c, *parent, *x; | 3573 | struct mem_node *c, *parent, *x; |
| 3574 | 3574 | ||
| 3575 | if (start < min_heap_address) | 3575 | if (min_heap_address == NULL || start < min_heap_address) |
| 3576 | min_heap_address = start; | 3576 | min_heap_address = start; |
| 3577 | if (end > max_heap_address) | 3577 | if (max_heap_address == NULL || end > max_heap_address) |
| 3578 | max_heap_address = end; | 3578 | max_heap_address = end; |
| 3579 | 3579 | ||
| 3580 | /* See where in the tree a node for START belongs. In this | 3580 | /* See where in the tree a node for START belongs. In this |