changeset 212:8670e1572be8

fix for a bug that apply_filter() would crash if both sender and buffer have been cleared.
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Mon, 25 Aug 2008 21:37:09 +0900
parents e13103257b33
children 68d2e1b46a15
files pidgin-twitter.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin-twitter.c	Mon Aug 25 21:17:02 2008 +0900
+++ b/pidgin-twitter.c	Mon Aug 25 21:37:09 2008 +0900
@@ -1516,6 +1516,9 @@
     const gchar *list = NULL;
     gchar **candidates = NULL, **candidate = NULL;
 
+    g_return_if_fail(*sender != NULL);
+    g_return_if_fail(*buffer != NULL);
+
     gchar *plain = strip_html_markup(*buffer);
 
     switch(service) {
@@ -1557,6 +1560,7 @@
                 break;
             }
         }
+
         g_free(user);
         g_match_info_next(match_info, NULL);
     }