Skip to content

Commit eba8ee2

Browse files
committed
Use try_query for CoreWebView2_3 interface
1 parent 10db37a commit eba8ee2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

SampleApps/WebView2APISample/AppWindow.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -716,7 +716,7 @@ HRESULT AppWindow::OnCreateCoreWebView2ControllerCompleted(HRESULT result, ICore
716716
m_creationModeId == IDM_CREATION_MODE_TARGET_DCOMP);
717717
NewComponent<ControlComponent>(this, &m_toolbar);
718718

719-
m_webView3 = coreWebView2.query<ICoreWebView2_3>();
719+
m_webView3 = coreWebView2.try_query<ICoreWebView2_3>();
720720
if (m_webView3)
721721
{
722722
//! [AddVirtualHostNameToFolderMapping]

0 commit comments

Comments
 (0)