]> git.saurik.com Git - cydia.git/commitdiff
Fixed memory retain issue in _H<> and a crash bug in sources_ (causing nils).
authorJay Freeman (saurik) <saurik@saurik.com>
Fri, 24 Apr 2009 21:53:06 +0000 (21:53 +0000)
committerJay Freeman (saurik) <saurik@saurik.com>
Thu, 30 Sep 2010 07:13:14 +0000 (07:13 +0000)
Cydia.mm
control
make.sh

index 29c4df3fc4f8cd4084b9d63ef32d2fbaffc369d4..4966a1bcf0f6c1424cba5423a95933ab76891de5 100644 (file)
--- a/Cydia.mm
+++ b/Cydia.mm
@@ -1,5 +1,5 @@
 /* Cydia - iPhone UIKit Front-End for Debian APT
- * Copyright (C) 2008  Jay Freeman (saurik)
+ * Copyright (C) 2008-2009  Jay Freeman (saurik)
 */
 
 /*
@@ -216,6 +216,11 @@ class _H {
     }
 
   public:
+    _finline _H(const This_ &rhs) :
+        value_(rhs.value_ == nil ? nil : [rhs.value_ retain])
+    {
+    }
+
     _finline _H(Type_ *value = NULL, bool mended = false) :
         value_(value)
     {
@@ -3428,7 +3433,8 @@ static NSArray *Finishes_;
 }
 
 - (Source *) getSource:(pkgCache::PkgFileIterator)file {
-    return sources_[file->ID];
+    SourceMap::const_iterator i(sources_.find(file->ID));
+    return i == sources_.end() ? nil : i->second;
 }
 
 @end
diff --git a/control b/control
index 1b1a28db3940c5807ad6653d6e6c53f636cbdd79..5843ad6e251fbe5f4508aa426b329e8138d8a06f 100644 (file)
--- a/control
+++ b/control
@@ -5,7 +5,7 @@ Maintainer: Jay Freeman (saurik) <saurik@saurik.com>
 Architecture: iphoneos-arm
 Version: 1.0.2847-1
 Replaces: com.sosiphone.addcydia
-Depends: apr, apt (>= 0.7.20.2-20), darwintools, pcre, shell-cmds, system-cmds
+Depends: apr, apt7, darwintools, pcre, shell-cmds, system-cmds
 Pre-Depends: dpkg (>= 1.14.25-8)
 Conflicts: com.sosiphone.addcydia
 Description: graphical iPhone front-end for APT
diff --git a/make.sh b/make.sh
index 16015ce8cc88e59df7cc1ba3dde30f0566abb55f..f8edbe1ae931c4a44b6187d28a32277ddc8cd8e5 100755 (executable)
--- a/make.sh
+++ b/make.sh
@@ -1,2 +1,2 @@
 #!/bin/bash
-/apl/tel/exec.sh :apr:apt:pcre make package
+/apl/tel/exec.sh :apr:apr-lib:apt7:pcre make package