aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Ryujinx.HLE/HOS/Services/SurfaceFlinger/Types/AndroidFence.cs9
1 files changed, 8 insertions, 1 deletions
diff --git a/Ryujinx.HLE/HOS/Services/SurfaceFlinger/Types/AndroidFence.cs b/Ryujinx.HLE/HOS/Services/SurfaceFlinger/Types/AndroidFence.cs
index 62c53f2d..515efd05 100644
--- a/Ryujinx.HLE/HOS/Services/SurfaceFlinger/Types/AndroidFence.cs
+++ b/Ryujinx.HLE/HOS/Services/SurfaceFlinger/Types/AndroidFence.cs
@@ -70,7 +70,14 @@ namespace Ryujinx.HLE.HOS.Services.SurfaceFlinger
{
ref NvFence fence = ref NvFences[FenceCount - 1];
- gpuContext.Synchronization.RegisterCallbackOnSyncpoint(fence.Id, fence.Value, callback);
+ if (fence.IsValid())
+ {
+ gpuContext.Synchronization.RegisterCallbackOnSyncpoint(fence.Id, fence.Value, callback);
+ }
+ else
+ {
+ callback();
+ }
}
public uint GetFlattenedSize()