mirror of
https://github.com/brl/mutter.git
synced 2024-11-23 00:20:42 -05:00
Fixed a crash when destroying the actor of a LEAVE event
When processing a LEAVE event, one might destroy the actor, so the weak reference device->actor would be NULL. http://bugzilla.clutter-project.org/show_bug.cgi?id=2502 Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
This commit is contained in:
parent
2911d3db53
commit
601b958ab1
@ -359,12 +359,16 @@ _clutter_input_device_set_actor (ClutterInputDevice *device,
|
||||
*/
|
||||
_clutter_process_event (&cev);
|
||||
|
||||
_clutter_actor_set_has_pointer (device->cursor_actor, FALSE);
|
||||
g_object_weak_unref (G_OBJECT (device->cursor_actor),
|
||||
cursor_weak_unref,
|
||||
device);
|
||||
/* processing the event might have destroyed the actor */
|
||||
if (device->cursor_actor != NULL)
|
||||
{
|
||||
_clutter_actor_set_has_pointer (device->cursor_actor, FALSE);
|
||||
g_object_weak_unref (G_OBJECT (device->cursor_actor),
|
||||
cursor_weak_unref,
|
||||
device);
|
||||
|
||||
device->cursor_actor = NULL;
|
||||
device->cursor_actor = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (actor != NULL)
|
||||
|
Loading…
Reference in New Issue
Block a user