1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

WebBrowserComponent: Avoid nullptr dereference when WebView2 loader library is not present

This commit is contained in:
reuk 2025-01-06 18:53:51 +00:00
parent 9092182605
commit 8be78e9f7f
No known key found for this signature in database

View file

@ -658,6 +658,9 @@ public:
#endif #endif
}(); }();
if (createWebViewEnvironmentWithOptions == nullptr)
return {};
auto webViewOptions = Microsoft::WRL::Make<CoreWebView2EnvironmentOptions>(); auto webViewOptions = Microsoft::WRL::Make<CoreWebView2EnvironmentOptions>();
const auto userDataFolder = options.getWinWebView2BackendOptions().getUserDataFolder().getFullPathName(); const auto userDataFolder = options.getWinWebView2BackendOptions().getUserDataFolder().getFullPathName();