Skip to content

Commit

Permalink
Only initialize NSUserDefaults if pref filename is set
Browse files Browse the repository at this point in the history
  • Loading branch information
trevordevore committed Jul 19, 2018
1 parent d28651b commit 8da26d0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion framework/helpers/preferences/preferences.livecodescript
Expand Up @@ -19,7 +19,9 @@ on libraryStack

# Set target suite on macOS
if useNSUserDefaultsExtension("user") then
get NSUserDefaultsInitWithSuiteName(prefFilenameForPlatform("user"))
if filenameForPlatform("user") is not empty then
get NSUserDefaultsInitWithSuiteName(filenameForPlatform("user"))
end if
end if
end libraryStack

Expand Down

0 comments on commit 8da26d0

Please sign in to comment.