Fix possible null exception

This commit is contained in:
Jack251970 2025-09-30 21:20:00 +08:00
parent f239866c68
commit c27817eaf0

View file

@ -982,12 +982,12 @@ namespace Flow.Launcher.Infrastructure
{
case PInvoke.PBT_APMRESUMEAUTOMATIC:
// Operation is resuming automatically from a low-power state.This message is sent every time the system resumes
_func();
_func?.Invoke();
break;
case PInvoke.PBT_APMRESUMESUSPEND:
// 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
_func();
_func?.Invoke();
break;
}