Skip to content

Commit

Permalink
fix: modified wrong err value
Browse files Browse the repository at this point in the history
  • Loading branch information
Snshadow committed Dec 3, 2024
1 parent 4c1f995 commit 203c0bb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/edge/create_env_native.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ import (
func createCoreWebView2EnvironmentWithOptions(browserExecutableFolder, userDataFolder string, environmentCompletedHandle *iCoreWebView2CreateCoreWebView2EnvironmentCompletedHandler, additionalBrowserArgs string) error {
browserPathPtr, err := windows.UTF16PtrFromString(browserExecutableFolder)
if err != nil {
return fmt.Errorf("Error calling UTF16PtrFromString for %s: %v", browserExecutableFolder, nil)
return fmt.Errorf("Error calling UTF16PtrFromString for %s: %v", browserExecutableFolder, err)
}

userPathPtr, err := windows.UTF16PtrFromString(userDataFolder)
if err != nil {
return fmt.Errorf("Error calling UTF16PtrFromString for %s: %v", userDataFolder, nil)
return fmt.Errorf("Error calling UTF16PtrFromString for %s: %v", userDataFolder, err)
}

hr, err := webviewloader.CreateCoreWebView2EnvironmentWithOptions(
Expand All @@ -30,7 +30,7 @@ func createCoreWebView2EnvironmentWithOptions(browserExecutableFolder, userDataF
additionalBrowserArgs,
)
if err != nil {
return fmt.Errorf("Error calling CreateCoreWebView2EnvironmentWithOptions: %v", nil)
return fmt.Errorf("Error calling CreateCoreWebView2EnvironmentWithOptions: %v", err)
}

if hr != 0 {
Expand Down

0 comments on commit 203c0bb

Please sign in to comment.