[gimp] app: remove the timeout in GObject::dispose()
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: remove the timeout in GObject::dispose()
- Date: Sun, 17 Apr 2011 20:00:37 +0000 (UTC)
commit e3b1ed7728f56592560e0f3f0fc287b3c1ef248d
Author: Michael Natterer <mitch gimp org>
Date: Sun Apr 17 22:00:18 2011 +0200
app: remove the timeout in GObject::dispose()
app/display/gimpmotionbuffer.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/app/display/gimpmotionbuffer.c b/app/display/gimpmotionbuffer.c
index c349e3a..30a6464 100644
--- a/app/display/gimpmotionbuffer.c
+++ b/app/display/gimpmotionbuffer.c
@@ -123,6 +123,12 @@ gimp_motion_buffer_dispose (GObject *object)
{
GimpMotionBuffer *buffer = GIMP_MOTION_BUFFER (object);
+ if (buffer->event_delay_timeout)
+ {
+ g_source_remove (buffer->event_delay_timeout);
+ buffer->event_delay_timeout = 0;
+ }
+
if (buffer->event_history)
{
g_array_free (buffer->event_history, TRUE);
@@ -221,8 +227,8 @@ gimp_motion_buffer_eval_event (GimpMotionBuffer *buffer,
gdouble dir_delta_y = 0.0;
gdouble distance = 1.0;
- g_return_if_fail (GIMP_IS_MOTION_BUFFER (buffer));
- g_return_if_fail (coords != NULL);
+ g_return_val_if_fail (GIMP_IS_MOTION_BUFFER (buffer), FALSE);
+ g_return_val_if_fail (coords != NULL, FALSE);
/* the last_read_motion_time most be set unconditionally, so set
* it early
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]