Skip to content

[Issue,1.4.8] ExtendedBuyableVehicle throws NullReferenceException if secondaryPrefab is left blank. #173

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ScandalTheVandal opened this issue Feb 6, 2025 · 0 comments · May be fixed by #172

Comments

@ScandalTheVandal
Copy link

ScandalTheVandal commented Feb 6, 2025

I've been messing around with the ExtendedBuyableVehicles and noticed that if you do not assign a secondaryPrefab (which is used for the clipboard on the vanilla Company Cruiser) LLL will throw a NullReferenceException error (shown in the photo below)

The vehicle will still work regardless of this; what I assume is happening is that there's no safeguard in place to check if secondaryPrefab exists (during network registering?); (the item dropship for example does this - if (this.terminalScript.buyableVehicles[this.terminalScript.orderedVehicleFromTerminal].secondaryPrefab != null), so even if you don't include a secondaryPrefab it will still be able to deliver the vehicle)

Image

@ScandalTheVandal ScandalTheVandal changed the title [Issue,1.4.8] Vehicles [Issue,1.4.8] ExtendedBuyableVehicle throws NullReferenceException if secondaryPrefab is left blank. Feb 6, 2025
@WhiteSpike WhiteSpike linked a pull request Feb 8, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant