23 lines
765 B
Diff

From ce4029c6523d8ee9773958577e6edc32979d2271 Mon Sep 17 00:00:00 2001
From: sharkautarch <128002472+sharkautarch@users.noreply.github.com>
Date: Wed, 31 Jul 2024 18:36:38 -0400
Subject: [PATCH] wlserver: fix nullptr dereference on oPoint->pTimeline
---
src/wlserver.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/wlserver.cpp b/src/wlserver.cpp
index 79b9c5c5c..756393c6f 100644
--- a/src/wlserver.cpp
+++ b/src/wlserver.cpp
@@ -131,7 +131,7 @@ void GamescopeTimelinePoint::Release()
static std::optional<GamescopeAcquireTimelineState> TimelinePointToEventFd( const std::optional<GamescopeTimelinePoint>& oPoint )
{
- if (!oPoint)
+ if (!oPoint || !(oPoint->pTimeline) )
return std::nullopt;
uint64_t uSignalledPoint = 0;