From 12203a76c22cebff394a2b157a0d1f4cec3d46f8 Mon Sep 17 00:00:00 2001 From: Ron Dahlgren Date: Sat, 8 Jun 2013 22:16:14 -0700 Subject: Check stk before dereferencing This commit fixes #7022 - I've added an additional check to ensure that stk is not null before dereferencing it to get it's next element, assigning NULL if it is itself NULL. --- src/rt/rust_task.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/rt/rust_task.cpp') diff --git a/src/rt/rust_task.cpp b/src/rt/rust_task.cpp index b5ecb166175..c521feae72f 100644 --- a/src/rt/rust_task.cpp +++ b/src/rt/rust_task.cpp @@ -612,7 +612,7 @@ rust_task::new_big_stack() { } big_stack->task = this; - big_stack->next = stk->next; + big_stack->next = stk ? stk->next : NULL; if (big_stack->next) big_stack->next->prev = big_stack; big_stack->prev = stk; -- cgit 1.4.1-3-g733a5