summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main/lock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/lock.c b/main/lock.c
index 3c9fbd4db..902d63119 100644
--- a/main/lock.c
+++ b/main/lock.c
@@ -745,7 +745,7 @@ int __ast_rwlock_destroy(const char *filename, int lineno, const char *func, con
__ast_mutex_logger("%s line %d (%s): Error destroying rwlock %s: %s\n",
filename, lineno, func, rwlock_name, strerror(res));
}
- if (t->tracking) {
+ if (t->tracking && lt) {
ast_reentrancy_lock(lt);
lt->file[0] = filename;
lt->lineno[0] = lineno;