From fa57391891309545aebc94fae4d79f6fae683659 Mon Sep 17 00:00:00 2001 From: Roy Zhang Date: Wed, 4 Nov 2015 01:13:39 +0800 Subject: Fix dangling pointer errors --- capplets/mouse/mate-mouse-properties.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'capplets/mouse') diff --git a/capplets/mouse/mate-mouse-properties.c b/capplets/mouse/mate-mouse-properties.c index 2896ca18..8e638509 100644 --- a/capplets/mouse/mate-mouse-properties.c +++ b/capplets/mouse/mate-mouse-properties.c @@ -136,10 +136,14 @@ event_box_button_press_event (GtkWidget *widget, double_click_time = g_settings_get_int (mouse_settings, DOUBLE_CLICK_KEY); - if (test_maybe_timeout_id != 0) + if (test_maybe_timeout_id != 0) { g_source_remove (test_maybe_timeout_id); - if (test_on_timeout_id != 0) + test_maybe_timeout_id = 0; + } + if (test_on_timeout_id != 0) { g_source_remove (test_on_timeout_id); + test_on_timeout_id = 0; + } switch (double_click_state) { case DOUBLE_CLICK_TEST_OFF: -- cgit v1.2.1