From 63c2c0ce73b1014bf84cd8f3f9498ebe462d0413 Mon Sep 17 00:00:00 2001 From: theraven Date: Sat, 12 Feb 2011 11:03:41 +0000 Subject: [PATCH] Added NULL checks to class_respondsToSelector() --- sendmsg2.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sendmsg2.c b/sendmsg2.c index 1b8ea6f..1450e23 100644 --- a/sendmsg2.c +++ b/sendmsg2.c @@ -288,6 +288,8 @@ Slot_t objc_get_slot(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); }