From 446d46d2a2b02075b5bbcfb64bf9c7cde8ee741a Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Mon, 20 Jan 2014 01:59:26 -0800 Subject: [PATCH] Do not cache incomplete ffi_cifs after exceptions. --- Internal.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; } -- 2.49.0