blckngm / webview2

Rust bindings for WebView2
MIT License
73 stars 12 forks source link

Fix null pointer access on release build #17

Closed wusyong closed 3 years ago

wusyong commented 3 years ago

I suppose this is somehow related to #15.

get_interface will crash and return a STATUS_ACCESS_VIOLATION on release build if the get_method returns null pointer. Use ptr::null_mut instead of MaybeUninit can resolve this issue.

Tested with stream_range and custom_protocol from wry's example.

blckngm commented 3 years ago

So get_method no longer sets the pointer to NULL when it has nothing to return.

Thanks!