mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-15 21:57:10 +02:00
Fix possible crash in web apps.
This commit is contained in:
parent
8b2bbfba6a
commit
4108debca0
1 changed files with 3 additions and 2 deletions
|
@ -746,8 +746,9 @@ postEvent: function(eventType, eventData) {
|
|||
&QGuiApplication::focusWindowChanged
|
||||
) | rpl::filter([=](QWindow *focused) {
|
||||
const auto handle = _widget->window()->windowHandle();
|
||||
return _webview
|
||||
&& !_webview->window.widget()->isHidden()
|
||||
const auto widget = _webview ? _webview->window.widget() : nullptr;
|
||||
return widget
|
||||
&& !widget->isHidden()
|
||||
&& handle
|
||||
&& (focused == handle);
|
||||
}) | rpl::start_with_next([=] {
|
||||
|
|
Loading…
Add table
Reference in a new issue