Some mods have a null compClass, so catch that in allVaginas.

This commit is contained in:
lutepickle 2022-08-29 21:38:33 -07:00
parent 7899d9074f
commit 3ca018b0b6
3 changed files with 2 additions and 1 deletions

Binary file not shown.

View file

@ -86,7 +86,7 @@ namespace RJW_Menstruation
if (hediffDef.comps.NullOrEmpty()) continue;
foreach (HediffCompProperties comp in hediffDef.comps)
{
if (comp.compClass == typeof(HediffComp_Menstruation) || comp.compClass.IsSubclassOf(typeof(HediffComp_Menstruation)))
if (comp.compClass == typeof(HediffComp_Menstruation) || (comp.compClass?.IsSubclassOf(typeof(HediffComp_Menstruation)) ?? false))
{
allvaginas.Add(hediffDef);
break;

View file

@ -1,4 +1,5 @@
Version 1.0.7.4
- Fix errors when using mods with bad HediffCompProperties.
- Updated max size areola images by wruf.
- Title addition on pregnancy removed to match RJW 5.1.0.
- Improve compatibility with RJW 5.1.0 for multiple wombs.