Fixes the swizzling crash (#1943)
Summary: This fixes the issue mentioned in https://github.com/facebook/flipper/issues/1940 ## Changelog Pull Request resolved: https://github.com/facebook/flipper/pull/1943 Test Plan: User confirmed Reviewed By: mweststrate Differential Revision: D26577560 Pulled By: priteshrnandgaonkar fbshipit-source-id: dec4e34dcec4a3b3c20c11f0f2dc748fe2698693
This commit is contained in:
committed by
Facebook GitHub Bot
parent
adfc6e4f99
commit
c87a581747
@@ -91,6 +91,8 @@
|
|||||||
class_addMethod(cls, swizzledSelector, implementation, description->types);
|
class_addMethod(cls, swizzledSelector, implementation, description->types);
|
||||||
Method newMethod = class_getInstanceMethod(cls, swizzledSelector);
|
Method newMethod = class_getInstanceMethod(cls, swizzledSelector);
|
||||||
method_exchangeImplementations(oldMethod, newMethod);
|
method_exchangeImplementations(oldMethod, newMethod);
|
||||||
|
} else {
|
||||||
|
class_addMethod(cls, selector, implementation, methodDescription.types);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user