Ludeon Forums

Ludeon Forums

  • November 30, 2020, 01:58:15 AM
  • 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 429 times)

Albion

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

Hey,
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.

Kenneth

  • Developer
  • 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! ;)
Logged