summaryrefslogtreecommitdiff
path: root/src/libstrongswan/utils/backtrace.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstrongswan/utils/backtrace.c')
-rw-r--r--src/libstrongswan/utils/backtrace.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstrongswan/utils/backtrace.c b/src/libstrongswan/utils/backtrace.c
index fb2c4d1e8..f1584620b 100644
--- a/src/libstrongswan/utils/backtrace.c
+++ b/src/libstrongswan/utils/backtrace.c
@@ -314,7 +314,7 @@ static void print_sourceline(FILE *file, char *filename, void *ptr, void *base)
bool old = FALSE;
bfd_mutex->lock(bfd_mutex);
- if (lib->leak_detective)
+ if (lib && lib->leak_detective)
{
old = lib->leak_detective->set_state(lib->leak_detective, FALSE);
}
@@ -324,7 +324,7 @@ static void print_sourceline(FILE *file, char *filename, void *ptr, void *base)
data.entry = entry;
bfd_map_over_sections(entry->abfd, (void*)find_addr, &data);
}
- if (lib->leak_detective)
+ if (lib && lib->leak_detective)
{
lib->leak_detective->set_state(lib->leak_detective, old);
}