Fix file chooser crashes

This commit is contained in:
sheaf 2021-04-21 18:14:35 +02:00
parent 5717c80e93
commit 36a6a3ca4b

View file

@ -233,7 +233,6 @@ instance HandleAction OpenFile where
newDocHist = newHistory doc
newFileTab uiElts vars ( Just newDocHist ) tabLoc
updateHistoryState uiElts ( Just newDocHist )
GObject.objectUnref files
warningDialog
:: ( Show errMess, GTK.IsWindow window )
@ -291,7 +290,6 @@ instance HandleAction OpenFolder where
newDocHist = newHistory doc
newFileTab uiElts vars ( Just newDocHist ) tabLoc
updateHistoryState uiElts ( Just newDocHist )
GObject.objectUnref folder
--------------------
-- Save & Save as --
@ -354,7 +352,6 @@ withSavePath ( UIElements {..} ) action = do
saveFile <- GTK.fileChooserGetFile fileChooser
mbSavePath <- fmap fullFilePath <$> GIO.fileGetPath saveFile
for_ mbSavePath action
GObject.objectUnref saveFile
where
fullFilePath :: FilePath -> FilePath
fullFilePath fp