From: Jay Freeman (saurik) Date: Mon, 20 Jan 2014 09:59:26 +0000 (-0800) Subject: Do not cache incomplete ffi_cifs after exceptions. X-Git-Tag: v0.9.500~30 X-Git-Url: https://git.saurik.com/cycript.git/commitdiff_plain/446d46d2a2b02075b5bbcfb64bf9c7cde8ee741a Do not cache incomplete ffi_cifs after exceptions. --- diff --git a/Internal.hpp b/Internal.hpp index b4dd4a1..abb48ed 100644 --- a/Internal.hpp +++ b/Internal.hpp @@ -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; }