Fix assert error.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
This commit is contained in:
Yuhang Zhao 2020-06-18 17:05:45 +08:00
parent aa93f72c10
commit 79e40ae8c4
1 changed files with 3 additions and 1 deletions

View File

@ -964,7 +964,9 @@ bool WinNativeEventFilter::nativeEventFilter(const QByteArray &eventType,
// but according to Lucas, frameless applications crashed on many Win7
// machines because it's null. The temporary solution is also strange:
// upgrade drivers or switch to the basic theme.
Q_ASSERT(result);
if (!result) {
return false;
}
// The example code in Qt's documentation has this check. I don't know
// whether we really need this check or not, but adding this check won't
// bring us harm anyway.