diff options
author | Chun-wei Fan <fanchunwei@src.gnome.org> | 2014-03-20 14:32:26 +0800 |
---|---|---|
committer | Chun-wei Fan <fanchunwei@src.gnome.org> | 2014-03-20 22:37:17 +0800 |
commit | 4c204a4f3eb70e79e3a348b6347bc9686ab9f25e (patch) | |
tree | 98bfdc5924588ac4180258059d7050a7b117b779 | |
parent | 891d3fce0084134a6f6b725557877c3d6c7e8ad2 (diff) | |
download | clutter-4c204a4f3eb70e79e3a348b6347bc9686ab9f25e.tar.gz |
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
-rw-r--r-- | 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 524dce0ed..7a360c625 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 (); |