Skip to content

Commit

Permalink
add error message for nil callback in OnFileDrop
Browse files Browse the repository at this point in the history
  • Loading branch information
lyimmi committed Feb 3, 2024
1 parent 209d74d commit dba49ad
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions v2/pkg/runtime/draganddrop.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
// OnFileDrop returns a slice of file path strings when a drop is finished.
func OnFileDrop(ctx context.Context, callback func(x, y int, paths []string)) {
if callback == nil {
LogError(ctx, "OnFileDrop called with a nil callback")
return
}
EventsOn(ctx, "wails:file-drop", func(optionalData ...interface{}) {
Expand Down

0 comments on commit dba49ad

Please sign in to comment.