forked from github_mirror/framelesshelper
Fix crash in many cases
Check whether the QWindow is null Fixes: #37 Signed-off-by: Yuhang Zhao <2546789017@qq.com>
This commit is contained in:
parent
84ce2eb418
commit
b601d083bf
|
@ -1270,6 +1270,9 @@ bool WinNativeEventFilter::nativeEventFilter(const QByteArray &eventType,
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
const QWindow *window = getWindowFromRawHandle(msg->hwnd);
|
const QWindow *window = getWindowFromRawHandle(msg->hwnd);
|
||||||
|
if (!window) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
const auto data = reinterpret_cast<WINDOWDATA *>(
|
const auto data = reinterpret_cast<WINDOWDATA *>(
|
||||||
WNEF_EXECUTE_WINAPI_RETURN(GetWindowLongPtrW, 0, msg->hwnd, GWLP_USERDATA));
|
WNEF_EXECUTE_WINAPI_RETURN(GetWindowLongPtrW, 0, msg->hwnd, GWLP_USERDATA));
|
||||||
if (!data) {
|
if (!data) {
|
||||||
|
|
Loading…
Reference in New Issue