Skip to content

Commit

Permalink
修复 Crash
Browse files Browse the repository at this point in the history
  • Loading branch information
yulingtianxia committed Jul 16, 2019
1 parent d9eafd2 commit 8e86d37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion MessageThrottle/MessageThrottle.m
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ static IMP mt_getMsgForwardIMP(Class cls, SEL selector)
#if !defined(__arm64__)
Method originMethod = class_getInstanceMethod(cls, selector);
const char *originType = (char *)method_getTypeEncoding(originMethod);
if (originType[0] == _C_STRUCT_B) {
if (originType != NULL && originType[0] == _C_STRUCT_B) {
//In some cases that returns struct, we should use the '_stret' API:
//http://sealiesoftware.com/blog/archive/2008/10/30/objc_explain_objc_msgSend_stret.html
// As an ugly internal runtime implementation detail in the 32bit runtime, we need to determine of the method we hook returns a struct or anything larger than id.
Expand Down

0 comments on commit 8e86d37

Please sign in to comment.