summaryrefslogtreecommitdiff
path: root/Cydia.mm
diff options
context:
space:
mode:
Diffstat (limited to 'Cydia.mm')
-rw-r--r--Cydia.mm5
1 files changed, 5 insertions, 0 deletions
diff --git a/Cydia.mm b/Cydia.mm
index a8ed4b7..d2d9d78 100644
--- a/Cydia.mm
+++ b/Cydia.mm
@@ -1932,6 +1932,11 @@ CFComparisonResult PackageNameCompare(Package *lhs, Package *rhs, void *arg) {
CYString &rhi(PackageName(rhs, @selector(cyname)));
CFStringRef lhn(lhi), rhn(rhi);
+ if (lhn == NULL)
+ return rhn == NULL ? NSOrderedSame : NSOrderedAscending;
+ else if (rhn == NULL)
+ return NSOrderedDescending;
+
_profile(PackageNameCompare$NumbersLast)
if (!lhi.empty() && !rhi.empty()) {
UniChar lhc(CFStringGetCharacterAtIndex(lhn, 0));