Skip to content

Commit

Permalink
fix: add et null check to prevent crash
Browse files Browse the repository at this point in the history
  • Loading branch information
lazysegtree committed Feb 4, 2025
1 parent d55a056 commit e3e1671
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/internal/function.go
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ func (m *model) returnMetaData() {
return
}

if Config.Metadata && checkIsSymlinked.Mode()&os.ModeSymlink == 0 {
if Config.Metadata && checkIsSymlinked.Mode()&os.ModeSymlink == 0 && et != nil {

fileInfos := et.ExtractMetadata(filePath)

Expand Down
2 changes: 1 addition & 1 deletion src/internal/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ func (m *model) getFilePanelItems() {
// the path in state direcotory
func (m *model) quitSuperfile() {
// close exiftool session
if Config.Metadata {
if Config.Metadata && et != nil {
et.Close()
}
// cd on quit
Expand Down

0 comments on commit e3e1671

Please sign in to comment.