]> git.saurik.com Git - cydia.git/commitdiff
Do not attempt to copy nil strings.
authorJay Freeman (saurik) <saurik@saurik.com>
Tue, 8 Mar 2011 22:24:51 +0000 (14:24 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Tue, 8 Mar 2011 22:24:51 +0000 (14:24 -0800)
MobileCydia.mm

index 0d22a11f62b2a2955dc13ec115f59d3663632771..11127ac4483e9bd02f635198455c3fceb981f2ac 100644 (file)
@@ -5092,15 +5092,19 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
     Source *source = [package source];
 
     icon_ = [package icon];
-    name_ = [NSString stringWithString:[package name]];
+
+    if (NSString *name = [package name])
+        name_ = [NSString stringWithString:name];
 
     NSString *description(nil);
+
     if (description == nil && IsWildcat_)
         description = [package longDescription];
     if (description == nil)
         description = [package shortDescription];
 
-    description_ = [NSString stringWithString:description];
+    if (description != nil)
+        description_ = [NSString stringWithString:description];
 
     commercial_ = [package isCommercial];