aboutsummaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
Diffstat (limited to 'res')
-rw-r--r--res/res_odbc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/res/res_odbc.c b/res/res_odbc.c
index 7156341b4..29e302330 100644
--- a/res/res_odbc.c
+++ b/res/res_odbc.c
@@ -473,7 +473,7 @@ struct odbc_obj *ast_odbc_request_obj(const char *name, int check)
if (obj && check) {
ast_odbc_sanity_check(obj);
- } else if (obj->parent->idlecheck > 0 && ast_tvdiff_ms(ast_tvnow(), obj->last_used) / 1000 > obj->parent->idlecheck)
+ } else if (obj && obj->parent->idlecheck > 0 && ast_tvdiff_ms(ast_tvnow(), obj->last_used) / 1000 > obj->parent->idlecheck)
odbc_obj_connect(obj);
return obj;