Skip to content

Potential runtime crash in _NetWebView2_BrowserSetupWrapper if manager creation fails #130

Description

@Blowcake

Hi @ioa747,

Thanks again for the quick fix on #129!

While testing, I spotted one minor crash risk in _NetWebView2_BrowserSetupWrapper (around lines 808-820):

If _NetWebView2_CreateManager fails, it returns False. The code skips the If Not @error block, but then tries to log $oOuterWeb.BrowserWindowHandle at the end, which will crash the script.

A simple fix would be to guard it:

$MSG = " InnerWebViewWindow=" & $hInnerWebViewWindow & " BrowserWindowHandle=" & (IsObj($oOuterWeb) ? $oOuterWeb.BrowserWindowHandle : "[Not Created]")

Thanks again!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions