break early if recovered

This commit is contained in:
Felix Kratz 2023-11-09 23:38:32 +01:00
parent f6b7b0a3a8
commit 69d96e3a53

View file

@ -86,10 +86,12 @@ CGImageRef workspace_icon_for_app(char* app) {
ns_app = [app bundleIdentifier];
path = [[NSWorkspace sharedWorkspace] URLForApplicationWithBundleIdentifier:ns_app];
recovered = true;
break;
}
}
if (!recovered) return NULL;
}
NSImage* image = [[NSWorkspace sharedWorkspace] iconForFile:path.path];
if (!image) return NULL;