Windows: Fix crash when focus window does not have a native window.
Check and warn in that case. Change-Id: Ic513334b5aa48e1c7e44685c30da3e9be52c3c52 Task-number: QTBUG-43833 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
This commit is contained in:
parent
97a82f62c4
commit
9b35c2cc27
@ -209,7 +209,7 @@ void QWindowsInputContext::setFocusObject(QObject *object)
|
||||
imeNotifyCancelComposition(m_compositionContext.hwnd);
|
||||
|
||||
const QWindow *window = QGuiApplication::focusWindow();
|
||||
if (object && window) {
|
||||
if (object && window && window->handle()) {
|
||||
QWindowsWindow *platformWindow = QWindowsWindow::baseWindowOf(window);
|
||||
if (inputMethodAccepted()) {
|
||||
// Re-enable IME by associating default context saved on first disabling.
|
||||
|
Loading…
Reference in New Issue
Block a user