diff --git a/internal/osutils/shortcut/shortcut_windows.go b/internal/osutils/shortcut/shortcut_windows.go index c778d79f64..7668d6c4f4 100644 --- a/internal/osutils/shortcut/shortcut_windows.go +++ b/internal/osutils/shortcut/shortcut_windows.go @@ -66,7 +66,7 @@ func (s *Shortcut) Enable() error { logging.Debug("Creating Shortcut: %s", filename) cs, err := oleutil.CallMethod(wshell, "CreateShortcut", filename) if err != nil { - var oleErr *ole.OleError + oleErr := &ole.OleError{} if errors.As(err, &oleErr) { return errs.Wrap(err, "oleutil CreateShortcut returned error: %s, parent error: %s", oleErr.Description(), oleErr.SubError()) }