X-Git-Url: https://git.saurik.com/cycript.git/blobdiff_plain/40b1517d56f509a5faebb5ab25988c1d2216e879..c8a0500b2fc78101e1a7f3b2c99939f88a33aa4d:/Trampoline.t.cpp?ds=inline diff --git a/Trampoline.t.cpp b/Trampoline.t.cpp index 1d7cf95..f8780bc 100644 --- a/Trampoline.t.cpp +++ b/Trampoline.t.cpp @@ -32,6 +32,8 @@ static _finline void dlset(Baton *baton, Type_ &function, const char *name, void baton->dlerror(); } +// XXX: where you find this needs to be relative to CoreFoundation (or something) +// XXX: this needs to check if the framework is under PrivateFrameworks instead #define Framework(framework) \ "/System/Library/Frameworks/" #framework ".framework/" #framework @@ -66,10 +68,12 @@ void *Routine(void *arg) { void (*CYHandleServer)(pid_t); dlset(baton, CYHandleServer, "CYHandleServer", handle); + if (CYHandleServer == NULL) { + baton->dlerror(); + return NULL; + } - if (CYHandleServer != NULL) - CYHandleServer(baton->pid); - + CYHandleServer(baton->pid); return NULL; }