aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util/u_debug_stack.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/auxiliary/util/u_debug_stack.c')
-rw-r--r--src/gallium/auxiliary/util/u_debug_stack.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/util/u_debug_stack.c b/src/gallium/auxiliary/util/u_debug_stack.c
index cf05f13ddd0..14d5b16c376 100644
--- a/src/gallium/auxiliary/util/u_debug_stack.c
+++ b/src/gallium/auxiliary/util/u_debug_stack.c
@@ -62,7 +62,7 @@ debug_backtrace_capture(struct debug_stack_frame *backtrace,
while ((start_frame > 0) && (unw_step(&cursor) > 0))
start_frame--;
- while (unw_step(&cursor) > 0) {
+ while ((i < nr_frames) && (unw_step(&cursor) > 0)) {
char procname[256];
const char *filename;
unw_word_t off;