Added check for selectors==0
authorKresten Krab Thorup <krab@gcc.gnu.org>
Thu, 29 Apr 1993 11:50:17 +0000 (11:50 +0000)
committerKresten Krab Thorup <krab@gcc.gnu.org>
Thu, 29 Apr 1993 11:50:17 +0000 (11:50 +0000)
From-SVN: r4271

gcc/objc/init.c

index 17a650c00ce779a9bb73aef338d6ce7b1d63268c..7277513bb7def37df633b5ae691c0a80dc87f7d1 100644 (file)
@@ -118,8 +118,11 @@ __objc_exec_class (Module_t module)
    }
 
   /* Replace referenced selectors from names to SEL's.  */
-  for (i = 0; selectors[i]; ++i)
-    selectors[i] = sel_register_name ((const char *) selectors[i]);
+  if (selectors)
+    {
+      for (i = 0; selectors[i]; ++i)
+       selectors[i] = sel_register_name ((const char *) selectors[i]);
+    }
 
   /* Process category information from the module.  */
   for (i = 0; i < symtab->cat_def_cnt; ++i)