From be8ca11b9e5779d8fb1aeb847da106f36febc851 Mon Sep 17 00:00:00 2001 From: Michael Snyder Date: Mon, 13 Aug 2007 22:25:14 +0000 Subject: 2007-08-13 Michael Snyder * source.c (find_source_lines): Require symtab 's'. --- gdb/source.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gdb/source.c') diff --git a/gdb/source.c b/gdb/source.c index 1067e62..3f6d781 100644 --- a/gdb/source.c +++ b/gdb/source.c @@ -1122,11 +1122,12 @@ find_source_lines (struct symtab *s, int desc) long mtime = 0; int size; + gdb_assert (s); line_charpos = (int *) xmalloc (lines_allocated * sizeof (int)); if (fstat (desc, &st) < 0) perror_with_name (s->filename); - if (s && s->objfile && s->objfile->obfd) + if (s->objfile && s->objfile->obfd) mtime = bfd_get_mtime (s->objfile->obfd); else if (exec_bfd) mtime = bfd_get_mtime (exec_bfd); -- cgit v1.1