summaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
authorportix <portix@gmx.net>2010-12-20 10:51:43 +0100
committerportix <portix@gmx.net>2010-12-20 10:51:43 +0100
commit5e89072999741699983cc1578643685bcb7b2c2c (patch)
treeaef709ef58705962a26ef4fbd2a9290884f74f1e /src/util.c
parente0213b8ad8ffda102797cec0004203f4de9c281b (diff)
downloaddwb-5e89072999741699983cc1578643685bcb7b2c2c.zip
added mail-program property
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util.c b/src/util.c
index b963bac7..45abef3e 100644
--- a/src/util.c
+++ b/src/util.c
@@ -14,7 +14,7 @@ char *
dwb_util_string_replace(const char *haystack, const char *needle, const char *replacemant) {
char **token;
char *ret = NULL;
- if ( (token = g_regex_split_simple(needle, haystack, 0, 0)) && strcmp(token[0], haystack)) {
+ if ( haystack && needle && (token = g_regex_split_simple(needle, haystack, 0, 0)) && strcmp(token[0], haystack)) {
ret = g_strconcat(token[0], replacemant, token[1], NULL);
g_strfreev(token);
}