summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>2011-01-14 03:29:58 +0000
committerMike Blumenkrantz <michael.blumenkrantz@gmail.com>2011-01-14 03:29:58 +0000
commit155f1900b4b0cf93d0f6a781bfff572d054f60fb (patch)
tree7b57ae25b7b7162c28c06fa2fb27d6399267e729
parent0750dea178cd5d9c4fadd7b740573f13ee25bf16 (diff)
we null check right before this. seriously.
SVN revision: 56090
-rw-r--r--src/lib/eina_log.c21
1 files changed, 6 insertions, 15 deletions
diff --git a/src/lib/eina_log.c b/src/lib/eina_log.c
index 33c021d..7941667 100644
--- a/src/lib/eina_log.c
+++ b/src/lib/eina_log.c
@@ -1192,22 +1192,13 @@ eina_log_domain_new(Eina_Log_Domain *d, const char *name, const char *color)
1192 d->level = EINA_LOG_LEVEL_UNKNOWN; 1192 d->level = EINA_LOG_LEVEL_UNKNOWN;
1193 d->deleted = EINA_FALSE; 1193 d->deleted = EINA_FALSE;
1194 1194
1195 if (name) 1195 if ((color) && (!_disable_color))
1196 { 1196 d->domain_str = eina_log_domain_str_get(name, color);
1197 if ((color) && (!_disable_color))
1198 d->domain_str = eina_log_domain_str_get(name, color);
1199 else
1200 d->domain_str = eina_log_domain_str_get(name, NULL);
1201
1202 d->name = strdup(name);
1203 d->namelen = strlen(name);
1204 }
1205 else 1197 else
1206 { 1198 d->domain_str = eina_log_domain_str_get(name, NULL);
1207 d->domain_str = NULL; 1199
1208 d->name = NULL; 1200 d->name = strdup(name);
1209 d->namelen = 0; 1201 d->namelen = strlen(name);
1210 }
1211 1202
1212 return d; 1203 return d;
1213} 1204}