Skip to content

Commit c27817e

Browse files
committed
Fix possible null exception
1 parent f239866 commit c27817e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Flow.Launcher.Infrastructure/Win32Helper.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -982,12 +982,12 @@ private static unsafe uint DeviceNotifyCallback(void* context, uint type, void*
982982
{
983983
case PInvoke.PBT_APMRESUMEAUTOMATIC:
984984
// Operation is resuming automatically from a low-power state.This message is sent every time the system resumes
985-
_func();
985+
_func?.Invoke();
986986
break;
987987

988988
case PInvoke.PBT_APMRESUMESUSPEND:
989989
// Operation is resuming from a low-power state.This message is sent after PBT_APMRESUMEAUTOMATIC if the resume is triggered by user input, such as pressing a key
990-
_func();
990+
_func?.Invoke();
991991
break;
992992
}
993993

0 commit comments

Comments
 (0)