[Xfce4-commits] <xfce4-notifyd:master> Added type checks to prevent crashes.

Jérôme Guelfucci noreply at xfce.org
Sat Sep 21 11:16:01 CEST 2013


Updating branch refs/heads/master
         to 9b814e99d10791d672c48c49216b322bd1b3a3fc (commit)
       from 699cba5558b1a6b4f3d5b4c83d5bca43f1d3798a (commit)

commit 9b814e99d10791d672c48c49216b322bd1b3a3fc
Author: Andrzej <ndrwrdck at gmail.com>
Date:   Wed Sep 18 02:21:08 2013 +0100

    Added type checks to prevent crashes.

 xfce4-notifyd/xfce-notify-window.c |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/xfce4-notifyd/xfce-notify-window.c b/xfce4-notifyd/xfce-notify-window.c
index 285a70e..6c820e2 100644
--- a/xfce4-notifyd/xfce-notify-window.c
+++ b/xfce4-notifyd/xfce-notify-window.c
@@ -626,6 +626,8 @@ xfce_notify_window_configure_event(GtkWidget *widget,
 static gboolean
 xfce_notify_window_expire_timeout(gpointer data)
 {
+    g_return_val_if_fail(XFCE_IS_NOTIFY_WINDOW(data), FALSE);
+
     XfceNotifyWindow *window = data;
     gboolean          fade_transparent;
 
@@ -650,6 +652,8 @@ xfce_notify_window_expire_timeout(gpointer data)
 static gboolean
 xfce_notify_window_fade_timeout(gpointer data)
 {
+    g_return_val_if_fail(XFCE_IS_NOTIFY_WINDOW(data), FALSE);
+
     XfceNotifyWindow *window = data;
     gdouble op = gtk_window_get_opacity(GTK_WINDOW(window));
 
@@ -673,6 +677,8 @@ static void
 xfce_notify_window_button_clicked(GtkWidget *widget,
                                   gpointer user_data)
 {
+    g_return_if_fail(XFCE_IS_NOTIFY_WINDOW(user_data));
+
     XfceNotifyWindow *window = XFCE_NOTIFY_WINDOW(user_data);
     gchar *action_id;
 


More information about the Xfce4-commits mailing list