From bed6c0a27926364092db11cb69271796ef339d1e Mon Sep 17 00:00:00 2001 From: MeijisIrlnd Date: Thu, 15 Aug 2024 03:18:22 +0100 Subject: [PATCH] un-nulled webview in onDestroy --- source/gui/mostlyharmless_WebviewEditor.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/source/gui/mostlyharmless_WebviewEditor.cpp b/source/gui/mostlyharmless_WebviewEditor.cpp index 14a1471..3673e89 100644 --- a/source/gui/mostlyharmless_WebviewEditor.cpp +++ b/source/gui/mostlyharmless_WebviewEditor.cpp @@ -25,7 +25,7 @@ namespace mostly_harmless::gui { m_window->setMinimumSize(iWidth, iHeight); m_window->setMinimumSize(iWidth, iHeight); m_window->setWindowTitle("Test"); - m_webview = std::make_unique(choc::ui::WebView::Options{ .enableDebugMode=true} ); + m_webview = std::make_unique(choc::ui::WebView::Options{ .enableDebugMode = true }); m_window->setContent(m_webview->getViewHandle()); } @@ -85,13 +85,12 @@ namespace mostly_harmless::gui { void create() { - m_webview = std::make_unique(choc::ui::WebView::Options{ .enableDebugMode=true} ); + m_webview = std::make_unique(choc::ui::WebView::Options{ .enableDebugMode = true }); helpers::macos::setViewSize(m_webview->getViewHandle(), m_initialWidth, m_initialHeight); } void destroy() { helpers::macos::removeFromParentView(m_webview->getViewHandle()); - m_webview = nullptr; } void getSize(std::uint32_t* width, std::uint32_t* height) {