mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2025-01-11 15:59:08 +01:00
Make sure to perform null check before invoking event handler
This commit is contained in:
parent
2cf33e1bba
commit
9fd97ee467
@ -160,7 +160,7 @@ namespace DS4Windows
|
|||||||
if (Byte.TryParse(WindowsEnumerator.WindowText(EditWindows[3].hWnd), out red))
|
if (Byte.TryParse(WindowsEnumerator.WindowText(EditWindows[3].hWnd), out red))
|
||||||
if (Byte.TryParse(WindowsEnumerator.WindowText(EditWindows[4].hWnd), out green))
|
if (Byte.TryParse(WindowsEnumerator.WindowText(EditWindows[4].hWnd), out green))
|
||||||
if (Byte.TryParse(WindowsEnumerator.WindowText(EditWindows[5].hWnd), out blue))
|
if (Byte.TryParse(WindowsEnumerator.WindowText(EditWindows[5].hWnd), out blue))
|
||||||
OnUpdateColor(Color.FromArgb(red, green, blue), EventArgs.Empty);
|
OnUpdateColor?.Invoke(Color.FromArgb(red, green, blue), EventArgs.Empty);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Always call the base class hook procedure.
|
// Always call the base class hook procedure.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user