]> git.saurik.com Git - cycript.git/commitdiff
Do not cache incomplete ffi_cifs after exceptions.
authorJay Freeman (saurik) <saurik@saurik.com>
Mon, 20 Jan 2014 09:59:26 +0000 (01:59 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Mon, 20 Jan 2014 09:59:26 +0000 (01:59 -0800)
Internal.hpp

index b4dd4a1b09502e70ed2edb55b3e7d41a19de086b..abb48eda52198f30a74e394ed674bc599063c341 100644 (file)
@@ -85,8 +85,6 @@ struct Type_privateData :
 
     ffi_type *GetFFI() {
         if (ffi_ == NULL) {
-            ffi_ = new(*pool_) ffi_type;
-
             sig::Element element;
             element.name = NULL;
             element.type = type_;
@@ -98,6 +96,8 @@ struct Type_privateData :
 
             ffi_cif cif;
             sig::sig_ffi_cif(*pool_, &sig::ObjectiveC, &signature, &cif);
+
+            ffi_ = new(*pool_) ffi_type;
             *ffi_ = *cif.rtype;
         }