aboutsummaryrefslogtreecommitdiff
path: root/gdb/tui/tuiSource.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/tui/tuiSource.c')
-rw-r--r--gdb/tui/tuiSource.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/tui/tuiSource.c b/gdb/tui/tuiSource.c
index 4a39e0a..2f52fc5 100644
--- a/gdb/tui/tuiSource.c
+++ b/gdb/tui/tuiSource.c
@@ -417,8 +417,9 @@ _hasBreak (char *sourceFileName, int lineNo)
(bp != (struct breakpoint *) NULL &&
bpWithBreak == (struct breakpoint *) NULL);
bp = bp->next)
- if ((strcmp (sourceFileName, bp->source_file) == 0) &&
- (lineNo == bp->line_number))
+ if (bp->source_file
+ && (strcmp (sourceFileName, bp->source_file) == 0)
+ && (lineNo == bp->line_number))
bpWithBreak = bp;
return bpWithBreak;