diff options
-rw-r--r-- | src/util/common_logging.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/util/common_logging.c b/src/util/common_logging.c index e7818e0f4..503fb671d 100644 --- a/src/util/common_logging.c +++ b/src/util/common_logging.c | |||
@@ -289,7 +289,9 @@ add_definition (char *component, char *file, char *function, int from_line, | |||
289 | n.file = strdup (file); | 289 | n.file = strdup (file); |
290 | n.strlen_file = strlen (file); | 290 | n.strlen_file = strlen (file); |
291 | } | 291 | } |
292 | if (strlen (function) > 0 && function[0] != '*') | 292 | if ( (NULL != function) && |
293 | (strlen (function) > 0) && | ||
294 | (function[0] != '*') ) | ||
293 | n.function = strdup (function); | 295 | n.function = strdup (function); |
294 | n.from_line = from_line; | 296 | n.from_line = from_line; |
295 | n.to_line = to_line; | 297 | n.to_line = to_line; |