aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@gmail.com>2011-05-02 19:52:06 +0800
committerXavier Claessens <xclaesse@gmail.com>2011-05-02 19:52:06 +0800
commitbc609ea14a874a1ef9c66747ce118228c9fb0a65 (patch)
treeccab6c80cf8c06fbfa9c1d624712d62fa1176583
parent4b846aa7efc67f6e01f2e4344d8da0a298d172b8 (diff)
downloadgsoc2013-empathy-bc609ea14a874a1ef9c66747ce118228c9fb0a65.tar
gsoc2013-empathy-bc609ea14a874a1ef9c66747ce118228c9fb0a65.tar.gz
gsoc2013-empathy-bc609ea14a874a1ef9c66747ce118228c9fb0a65.tar.bz2
gsoc2013-empathy-bc609ea14a874a1ef9c66747ce118228c9fb0a65.tar.lz
gsoc2013-empathy-bc609ea14a874a1ef9c66747ce118228c9fb0a65.tar.xz
gsoc2013-empathy-bc609ea14a874a1ef9c66747ce118228c9fb0a65.tar.zst
gsoc2013-empathy-bc609ea14a874a1ef9c66747ce118228c9fb0a65.zip
Fix a crash if replacement is NULL
-rw-r--r--libempathy-gtk/empathy-theme-adium.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libempathy-gtk/empathy-theme-adium.c b/libempathy-gtk/empathy-theme-adium.c
index 2ab3383b3..7d67bf98e 100644
--- a/libempathy-gtk/empathy-theme-adium.c
+++ b/libempathy-gtk/empathy-theme-adium.c
@@ -283,7 +283,7 @@ theme_adium_parse_body (EmpathyThemeAdium *self,
static void
escape_and_append_len (GString *string, const gchar *str, gint len)
{
- while (*str != '\0' && len != 0) {
+ while (str != NULL && *str != '\0' && len != 0) {
switch (*str) {
case '\\':
/* \ becomes \\ */
@@ -366,7 +366,7 @@ theme_adium_append_html (EmpathyThemeAdium *theme,
string = g_string_sized_new (len + strlen (message));
g_string_append_printf (string, "%s(\"", func);
for (cur = html; *cur != '\0'; cur++) {
- const gchar *replace = "";
+ const gchar *replace = NULL;
gchar *dup_replace = NULL;
gchar *format = NULL;