mirror of
https://github.com/darlinghq/darling-libobjc2.git
synced 2024-12-02 17:26:22 +00:00
Added NULL checks to class_respondsToSelector()
This commit is contained in:
parent
e76143d006
commit
63c2c0ce73
@ -288,6 +288,8 @@ Slot_t objc_get_slot(Class cls, SEL selector)
|
|||||||
|
|
||||||
BOOL class_respondsToSelector(Class cls, SEL selector)
|
BOOL class_respondsToSelector(Class cls, SEL selector)
|
||||||
{
|
{
|
||||||
|
if (0 == selector || 0 == cls) { return NO; }
|
||||||
|
|
||||||
return NULL != objc_get_slot(cls, selector);
|
return NULL != objc_get_slot(cls, selector);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user