Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/src/content/docs/changelog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Add distribution-specific build dependencies for Linux by @leaanthony in [PR](https://github.com/wailsapp/wails/pull/4345)
- Added bindings guide by @atterpac in [PR](https://github.com/wailsapp/wails/pull/4404)

### Fixed
- Fixed panic when closing or cancelling a `SaveFileDialog` on windows. Fixed in [PR](https://github.com/wailsapp/wails/pull/4284) by @hkhere

## v3.0.0-alpha.10 - 2025-07-06

### Breaking Changes
Expand Down
5 changes: 3 additions & 2 deletions v3/internal/go-common-file-dialog/cfd/vtblCommonFunc.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ package cfd

import (
"fmt"
"github.com/go-ole/go-ole"
"strings"
"syscall"
"unsafe"

"github.com/go-ole/go-ole"
)

func hresultToError(hr uintptr) error {
Expand Down Expand Up @@ -168,7 +169,7 @@ func (vtbl *iFileDialogVtbl) getResultString(objPtr unsafe.Pointer) (string, err
return "", err
}
if shellItem == nil {
return "", fmt.Errorf("shellItem is nil")
return "", ErrorCancelled
}
defer shellItem.vtbl.release(unsafe.Pointer(shellItem))
return shellItem.vtbl.getDisplayName(unsafe.Pointer(shellItem))
Expand Down
9 changes: 8 additions & 1 deletion v3/pkg/application/dialogs_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,16 @@ func (m *windowSaveFileDialog) show() (chan string, error) {
func() (cfd.Dialog, error) {
return cfd.NewSaveFileDialog(config)
}, false)
if err != nil {
close(files)
return files, err
}
go func() {
defer handlePanic()
files <- result.(string)
f, ok := result.(string)
if ok {
files <- f
}
close(files)
}()
return files, err
Expand Down
Loading