[gnome-remote-desktop] session: Don't submit PointerMotion events when stream is not ready
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-remote-desktop] session: Don't submit PointerMotion events when stream is not ready
- Date: Wed, 10 Feb 2021 14:52:52 +0000 (UTC)
commit 0cc6183b3c6509ed596b5cc94184b41cf1c91fa0
Author: Pascal Nowack <Pascal Nowack gmx de>
Date: Wed Feb 10 12:06:25 2021 +0100
session: Don't submit PointerMotion events when stream is not ready
mstsc submits PointerMotion events very early when it connects to the
server.
In such situations, the stream, which is needed for PointerMotion
events, might not be ready and gnome-remote-desktop will crash due to
dereferencing a NULL pointer.
To fix this, drop PointerMotion events if the stream is not yet ready.
src/grd-session.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/src/grd-session.c b/src/grd-session.c
index d945176..ed8a871 100644
--- a/src/grd-session.c
+++ b/src/grd-session.c
@@ -175,6 +175,9 @@ grd_session_notify_pointer_motion_absolute (GrdSession *session,
GrdSessionPrivate *priv = grd_session_get_instance_private (session);
const char *stream_path;
+ if (!priv->stream)
+ return;
+
stream_path = grd_stream_get_object_path (priv->stream);
grd_dbus_remote_desktop_session_call_notify_pointer_motion_absolute (
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]