aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-10-17 16:35:02 +0800
committercrupest <crupest@outlook.com>2020-10-17 16:35:02 +0800
commit58af3c346e7dd72be077bf5231bb7bf193591288 (patch)
tree61e0b454813bf0e291813d2d3167f213be20051e /src
parenta6538fa2fad30b098df5ddcadbcc463494575aec (diff)
downloadcru-58af3c346e7dd72be077bf5231bb7bf193591288.tar.gz
cru-58af3c346e7dd72be077bf5231bb7bf193591288.tar.bz2
cru-58af3c346e7dd72be077bf5231bb7bf193591288.zip
...
Diffstat (limited to 'src')
-rw-r--r--src/win/native/GodWindow.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/win/native/GodWindow.cpp b/src/win/native/GodWindow.cpp
index 203542f7..799a3cc6 100644
--- a/src/win/native/GodWindow.cpp
+++ b/src/win/native/GodWindow.cpp
@@ -14,14 +14,14 @@ LRESULT CALLBACK GodWndProc(HWND hWnd, UINT uMsg, WPARAM wParam,
if (app) {
LRESULT result;
- const auto handled = app->GetGodWindow()->HandleGodWindowMessage(
- hWnd, uMsg, wParam, lParam, &result);
- if (handled)
- return result;
- else
- return DefWindowProcW(hWnd, uMsg, wParam, lParam);
- } else
- return DefWindowProcW(hWnd, uMsg, wParam, lParam);
+ auto god_window = app->GetGodWindow();
+ if (god_window != nullptr) {
+ const auto handled = god_window->HandleGodWindowMessage(
+ hWnd, uMsg, wParam, lParam, &result);
+ if (handled) return result;
+ }
+ }
+ return DefWindowProcW(hWnd, uMsg, wParam, lParam);
}
GodWindow::GodWindow(WinUiApplication* application) {