[gnome-remote-desktop] session-rdp: Save wait return value before asserting it
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-remote-desktop] session-rdp: Save wait return value before asserting it
- Date: Mon, 25 Apr 2022 19:36:36 +0000 (UTC)
commit 716b1af9a742a58eb1575c60141a21209a367503
Author: Pascal Nowack <Pascal Nowack gmx de>
Date: Sun Apr 24 12:39:13 2022 +0200
session-rdp: Save wait return value before asserting it
This should make the stacktrace clearer, when the assertion is actually
hit.
src/grd-session-rdp.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/src/grd-session-rdp.c b/src/grd-session-rdp.c
index 7464523a..1260216d 100644
--- a/src/grd-session-rdp.c
+++ b/src/grd-session-rdp.c
@@ -2202,8 +2202,12 @@ grd_session_rdp_stop (GrdSession *session)
if (session_rdp->graphics_thread)
{
+ uint32_t status;
+
g_assert (session_rdp->graphics_context);
- g_assert (WaitForSingleObject (session_rdp->stop_event, 0) != WAIT_TIMEOUT);
+
+ status = WaitForSingleObject (session_rdp->stop_event, 0);
+ g_assert (status != WAIT_TIMEOUT);
g_main_context_wakeup (session_rdp->graphics_context);
g_clear_pointer (&session_rdp->graphics_thread, g_thread_join);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]