[Pkg-owncloud-commits] [owncloud-client] 23/60: utility_mac: Check for NULL from LSSharedFileListItemResolve #6123
Sandro Knauß
hefee at debian.org
Sat Dec 16 10:38:11 UTC 2017
This is an automated email from the git hooks/post-receive script.
hefee pushed a commit to branch upstream
in repository owncloud-client.
commit 6276d9290d2740d65bec3d0c409a43ba179f03d7
Author: Markus Goetz <markus at woboq.com>
Date: Tue Nov 28 13:35:15 2017 +0100
utility_mac: Check for NULL from LSSharedFileListItemResolve #6123
Possibly also #6074
---
src/common/utility_mac.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/utility_mac.cpp b/src/common/utility_mac.cpp
index 6c789b1..4d09db9 100644
--- a/src/common/utility_mac.cpp
+++ b/src/common/utility_mac.cpp
@@ -58,7 +58,7 @@ bool hasLaunchOnStartup_private(const QString &)
LSSharedFileListItemRef item = (LSSharedFileListItemRef)CFArrayGetValueAtIndex(itemsArray, i);
CFURLRef itemUrlRef = NULL;
- if (LSSharedFileListItemResolve(item, 0, &itemUrlRef, NULL) == noErr) {
+ if (LSSharedFileListItemResolve(item, 0, &itemUrlRef, NULL) == noErr && itemUrlRef) {
CFStringRef itemUrlString = CFURLGetString(itemUrlRef);
if (CFStringCompare(itemUrlString, appUrlRefString, 0) == kCFCompareEqualTo) {
returnValue = true;
@@ -100,7 +100,7 @@ void setLaunchOnStartup_private(const QString &appName, const QString &guiName,
LSSharedFileListItemRef item = (LSSharedFileListItemRef)CFArrayGetValueAtIndex(itemsArray, i);
CFURLRef itemUrlRef = NULL;
- if (LSSharedFileListItemResolve(item, 0, &itemUrlRef, NULL) == noErr) {
+ if (LSSharedFileListItemResolve(item, 0, &itemUrlRef, NULL) == noErr && itemUrlRef) {
CFStringRef itemUrlString = CFURLGetString(itemUrlRef);
if (CFStringCompare(itemUrlString, appUrlRefString, 0) == kCFCompareEqualTo) {
LSSharedFileListItemRemove(loginItems, item); // remove it!
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git
More information about the Pkg-owncloud-commits
mailing list