aEnigmatic / xcom2-launcher

Unofficial XCOM 2 launcher
GNU General Public License v3.0
0 stars 0 forks source link

It crashes when right-clicking on the empty space that is not a mod. #1

Closed robojumper closed 8 years ago

robojumper commented 8 years ago

In MainForm.ModList.cs, line 328, it checks whether if (m.ID == null) but it should check if (m == null || m.ID == null) because m is null if we don't select a mod and as such, m.ID throws a NullPointerException. I would have checked if that fixes it but i can't get it to compile (errors in assigning the properties and stuff).

aEnigmatic commented 8 years ago

Thanks, that did indeed fix it. What are your problems with compiling?

robojumper commented 8 years ago

public int Index { get; set; } = -1; Invalid token '=' (CS1519) public ModState State { get; set; } = ModState.None; Invalid token ';' (CS1519) public List<ModEntry> Entries { get; set; } = new List<ModEntry>(); Invalid token '(' (CS1519) MessageBox.Show($"A mod could not..."); Unexpected character '$' (CS1056) public ModList Mods { get; set; } = new ModList(); Method must have a return type (CS1520) Mostly these five Am I missing any assemblies or using-directives? I don't get any errors regarding this, it's just the compiler errors above.

BlueRaja commented 8 years ago

Those are all new C# 6 syntax. You need Visual Studio 2015 to compile it.

robojumper commented 8 years ago

Thank you. Makes sense, I really shouldn't be using SharpDevelop for stuff like this.

BlueRaja commented 8 years ago

There's no reason to use SharpDevelop (on Windows at least), VS 2015 is free: https://www.visualstudio.com/products/visual-studio-community-vs

robojumper commented 8 years ago

free*

*If Microsoft hadn't locked me out of my account. But the crash is fixed, so whatever.