aboutsummaryrefslogtreecommitdiffstats
path: root/res/res_odbc.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-07-11 19:56:34 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-07-11 19:56:34 +0000
commit5e34d71fb5cb7fa73520c802244508504443922b (patch)
treeee7e9cecd4188e4dc8167d786ee3493107c800cf /res/res_odbc.c
parent03b8be1724117da92bf9bf6e2b43236c94975f73 (diff)
Don't copy on NULL.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@130234 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/res_odbc.c')
-rw-r--r--res/res_odbc.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/res/res_odbc.c b/res/res_odbc.c
index 674bc09e8..f7a5f3e85 100644
--- a/res/res_odbc.c
+++ b/res/res_odbc.c
@@ -741,9 +741,11 @@ struct odbc_obj *ast_odbc_request_obj(const char *name, int check)
odbc_obj_connect(obj);
#if DEBUG_THREADS
- ast_copy_string(obj->file, file, sizeof(obj->file));
- ast_copy_string(obj->function, function, sizeof(obj->function));
- obj->lineno = lineno;
+ if (obj) {
+ ast_copy_string(obj->file, file, sizeof(obj->file));
+ ast_copy_string(obj->function, function, sizeof(obj->function));
+ obj->lineno = lineno;
+ }
#endif
return obj;