Просмотр исходного кода

If we fail to get a descriptor just super the method resolving.

This should never happen, but if someone is swizzling or do other
hooking of methods, anything is possible, so this seems slighty
safer than they returning NO.
Thomas Van Lenten 8 лет назад
Родитель
Сommit
db45687a38
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      objectivec/GPBMessage.m

+ 1 - 1
objectivec/GPBMessage.m

@@ -3077,7 +3077,7 @@ static void ResolveIvarSet(GPBFieldDescriptor *field,
 + (BOOL)resolveInstanceMethod:(SEL)sel {
 + (BOOL)resolveInstanceMethod:(SEL)sel {
   const GPBDescriptor *descriptor = [self descriptor];
   const GPBDescriptor *descriptor = [self descriptor];
   if (!descriptor) {
   if (!descriptor) {
-    return NO;
+    return [super resolveInstanceMethod:sel];
   }
   }
 
 
   // NOTE: hasOrCountSel_/setHasSel_ will be NULL if the field for the given
   // NOTE: hasOrCountSel_/setHasSel_ will be NULL if the field for the given