diff --git a/lr-inaturalist-publish.lrdevplugin/INaturalistAPI.lua b/lr-inaturalist-publish.lrdevplugin/INaturalistAPI.lua index fd2ffbe..ab07dc3 100644 --- a/lr-inaturalist-publish.lrdevplugin/INaturalistAPI.lua +++ b/lr-inaturalist-publish.lrdevplugin/INaturalistAPI.lua @@ -23,6 +23,9 @@ function INaturalistAPI:new(login, accessToken) setmetatable(o, { __index = self }) if login and not accessToken then accessToken = LrPasswords.retrieve(login) + if not accessToken then + return nil + end end o.accessToken = accessToken return o