fix redefinition of loginItems

This commit is contained in:
janko33bd
2018-01-19 17:23:52 +01:00
parent 764797ad06
commit 7bc7f5439c

View File

@@ -875,7 +875,6 @@ bool GetStartOnSystemStartup()
LSSharedFileListRef loginItems = LSSharedFileListCreate(nullptr, kLSSharedFileListSessionLoginItems, nullptr);
LSSharedFileListItemRef foundItem = findStartupItemInList(loginItems, bitcoinAppUrl);
LSSharedFileListRef loginItems = LSSharedFileListCreate(NULL, kLSSharedFileListSessionLoginItems, NULL);
CFRelease(bitcoinAppUrl);
return !!foundItem; // return boolified object
@@ -891,7 +890,6 @@ bool SetStartOnSystemStartup(bool fAutoStart)
LSSharedFileListRef loginItems = LSSharedFileListCreate(nullptr, kLSSharedFileListSessionLoginItems, nullptr);
LSSharedFileListItemRef foundItem = findStartupItemInList(loginItems, bitcoinAppUrl);
LSSharedFileListRef loginItems = LSSharedFileListCreate(NULL, kLSSharedFileListSessionLoginItems, NULL);
if(fAutoStart && !foundItem) {
// add bitcoin app to startup item list