mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-07-14 19:10:28 +03:00
fix(tauri-runtime-wry): Window::inner_size crash when the window has no webviews (#9428)
This commit is contained in:
parent
c8a82ad223
commit
02eaf07872
5
.changes/fix-window-inner-size-crash.md
Normal file
5
.changes/fix-window-inner-size-crash.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
"tauri-runtime-wry": patch:bug
|
||||
---
|
||||
|
||||
Fixes `inner_size` crash when the window has no webviews.
|
@ -4082,7 +4082,7 @@ fn inner_size(
|
||||
webviews: &[WebviewWrapper],
|
||||
has_children: bool,
|
||||
) -> TaoPhysicalSize<u32> {
|
||||
if !has_children {
|
||||
if !has_children && webviews.len() > 0 {
|
||||
use wry::WebViewExtMacOS;
|
||||
let webview = webviews.first().unwrap();
|
||||
let view_frame = unsafe { cocoa::appkit::NSView::frame(webview.webview()) };
|
||||
|
Loading…
Reference in New Issue
Block a user