Ludeon Forums

Ludeon Forums

  • September 27, 2021, 08:44:07 PM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: [1.0.2059] GenRecipe.PostProcessProduct leads to nullReference Exception  (Read 579 times)


  • Colonist
  • ***
  • Posts: 428
  • Glitterworld Modder
    • View Profile

I created a recipe to craft Doomsday and triple rocket launchers for my mod.
However I ran into the following problem:
The vanilla defs for these launchers inherit from the BaseGun def which includes the art comp but NOT the quality comp. However when the recipe is finished the Method PostProcessProduct in the class GenRecipe gets called. The method checks first if the compQuality is null (which it is) and then checks for the compArt (which is NOT null) in the following process it however calls the compQuality without checking again if it is still null!
This leads to a nullRef exception because the launchers have a compArt but NOT a compQuality.

Therefore either the method has to be adjusted to check again for the compQuality or the entire subroutine for compArt should be moved into the routine for compQuality.
Alternatively the BaseGun def should have it's compArt moved to the BaseGunWithQuality def.


  • Colonist
  • ***
  • Posts: 305
  • Refugee
    • View Profile
Re: [1.0.2059] GenRecipe.PostProcessProduct leads to nullReference Exception
« Reply #1 on: November 29, 2018, 06:51:51 PM »

Fixed, thanks for reporting! ;)