summaryrefslogtreecommitdiff
path: root/libobjc
diff options
context:
space:
mode:
Diffstat (limited to 'libobjc')
-rw-r--r--libobjc/ChangeLog5
-rw-r--r--libobjc/ivars.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/libobjc/ChangeLog b/libobjc/ChangeLog
index 2e2b543b2dc..a3f31b73023 100644
--- a/libobjc/ChangeLog
+++ b/libobjc/ChangeLog
@@ -1,3 +1,8 @@
+2015-01-09 Dimitris Papavasiliou <dpapavas@gmail.com>
+
+ * ivars.c: Add a check for classes without instance
+ variables, which have a NULL ivar list pointer.
+
2015-01-05 Jakub Jelinek <jakub@redhat.com>
Update copyright years.
diff --git a/libobjc/ivars.c b/libobjc/ivars.c
index dd145360e39..910a09828db 100644
--- a/libobjc/ivars.c
+++ b/libobjc/ivars.c
@@ -179,7 +179,7 @@ struct objc_ivar ** class_copyIvarList (Class class_, unsigned int *numberOfRetu
struct objc_ivar **returnValue = NULL;
struct objc_ivar_list* ivar_list;
- if (class_ == Nil || CLS_IS_IN_CONSTRUCTION (class_))
+ if (class_ == Nil || CLS_IS_IN_CONSTRUCTION (class_) || !class_->ivars)
{
if (numberOfReturnedIvars)
*numberOfReturnedIvars = 0;