diff options
author | crupest <crupest@outlook.com> | 2020-10-17 16:35:02 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2020-10-17 16:35:02 +0800 |
commit | 58af3c346e7dd72be077bf5231bb7bf193591288 (patch) | |
tree | 61e0b454813bf0e291813d2d3167f213be20051e /src/win/native/GodWindow.cpp | |
parent | a6538fa2fad30b098df5ddcadbcc463494575aec (diff) | |
download | cru-58af3c346e7dd72be077bf5231bb7bf193591288.tar.gz cru-58af3c346e7dd72be077bf5231bb7bf193591288.tar.bz2 cru-58af3c346e7dd72be077bf5231bb7bf193591288.zip |
...
Diffstat (limited to 'src/win/native/GodWindow.cpp')
-rw-r--r-- | src/win/native/GodWindow.cpp | 16 |
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) { |