summaryrefslogtreecommitdiff
path: root/libdwfl/find-debuginfo.c
diff options
context:
space:
mode:
Diffstat (limited to 'libdwfl/find-debuginfo.c')
-rw-r--r--libdwfl/find-debuginfo.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libdwfl/find-debuginfo.c b/libdwfl/find-debuginfo.c
index 4cfd0b8b..eb68d549 100644
--- a/libdwfl/find-debuginfo.c
+++ b/libdwfl/find-debuginfo.c
@@ -355,6 +355,9 @@ dwfl_standard_find_debuginfo (Dwfl_Module *mod,
GElf_Word debuglink_crc,
char **debuginfo_file_name)
{
+ if (mod == NULL)
+ return -1;
+
/* First try by build ID if we have one. If that succeeds or fails
other than just by finding nothing, that's all we do. */
const unsigned char *bits = NULL;