[fix, plugin] Wallabag: avoid crash when setDownloadDirectory doesn't have a touchmenu_instance (#8933)

Fixes #8930.
reviewable/pr8938/r1
Frans de Jonge 2 years ago committed by GitHub
parent b3a9cef97b
commit eeefc657cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1077,12 +1077,14 @@ end
function Wallabag:setDownloadDirectory(touchmenu_instance)
require("ui/downloadmgr"):new{
onConfirm = function(path)
logger.dbg("Wallabag: set download directory to: ", path)
self.directory = path
self:saveSettings()
touchmenu_instance:updateItems()
end,
onConfirm = function(path)
logger.dbg("Wallabag: set download directory to: ", path)
self.directory = path
self:saveSettings()
if touchmenu_instance then
touchmenu_instance:updateItems()
end
end,
}:chooseDir()
end

Loading…
Cancel
Save