summaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
authorTilghman Lesher <tilghman@meg.abyt.es>2008-07-11 19:56:34 +0000
committerTilghman Lesher <tilghman@meg.abyt.es>2008-07-11 19:56:34 +0000
commitcaf226d50e337bdd47da29c1af77aaa9ec4c75da (patch)
treeee7e9cecd4188e4dc8167d786ee3493107c800cf /res
parentbead8cd6f09f40804b56ff058a5fb86803a747cf (diff)
Don't copy on NULL.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@130234 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res')
-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;