[clutter/clutter-1.18] clutter-event-win32.c: Avoid a Crash
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter/clutter-1.18] clutter-event-win32.c: Avoid a Crash
- Date: Thu, 20 Mar 2014 14:37:40 +0000 (UTC)
commit 4c204a4f3eb70e79e3a348b6347bc9686ab9f25e
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Thu Mar 20 14:32:26 2014 +0800
clutter-event-win32.c: Avoid a Crash
Commit e70a0109 simplified the dispatching of events by passing the event's
owernership to ClutterStage, but it may be so that any.stage is NULL at
some point on Windows, which will either cause _clutter_stage_queue_event()
to crash or issue a critical warning. Avoid this problem by checking
whether event->any.stage is not NULL before trying to call
_clutter_stage_queue_event().
https://bugzilla.gnome.org/show_bug.cgi?id=726765
clutter/win32/clutter-event-win32.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/clutter/win32/clutter-event-win32.c b/clutter/win32/clutter-event-win32.c
index 524dce0..7a360c6 100644
--- a/clutter/win32/clutter-event-win32.c
+++ b/clutter/win32/clutter-event-win32.c
@@ -294,7 +294,8 @@ clutter_event_dispatch (GSource *source,
if ((event = clutter_event_get ()))
{
/* forward the event into clutter for emission etc. */
- _clutter_stage_queue_event (event->any.stage, event, FALSE);
+ if (event->any.stage)
+ _clutter_stage_queue_event (event->any.stage, event, FALSE);
}
_clutter_threads_release_lock ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]