rallion / depressurizer

GNU General Public License v3.0
784 stars 78 forks source link

Program crashes when anything entered into "Search" field #29

Open lainverse opened 9 years ago

lainverse commented 9 years ago

Program version: 0.6.1.0

A fatal error has occurred in Depressurizer. The program will now terminate.

NullReferenceException: Object reference not set to an instance of an object. at Depressurizer.FormMain.ShouldDisplayGame(GameInfo g) at Depressurizer.FormMain.ShouldHideGame(GameInfo g) at System.Collections.Generic.List1.RemoveAll(Predicate1 match) at Depressurizer.FormMain.UpdateGameList() at Depressurizer.FormMain.txtSearch_TextChanged(Object sender, EventArgs e) at System.Windows.Forms.Control.OnTextChanged(EventArgs e) at System.Windows.Forms.TextBoxBase.OnTextChanged(EventArgs e) at System.Windows.Forms.TextBoxBase.WmReflectCommand(Message& m) at System.Windows.Forms.TextBoxBase.WndProc(Message& m) at System.Windows.Forms.TextBox.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Just in case here is my prefs and library: https://dl.dropboxusercontent.com/u/11450709/Depressurizer-lib.zip

lainverse commented 9 years ago

Seems like I noticed the source of the issue myself. Somehow "Twin Sector" (27900) end up without a name. So, if some game name is empty program crashes. I think it still have to be fixed. Program shouldn't crash from something as simple as that.

keringar commented 9 years ago

I have fixed the bug by adding a check for null strings in the method FillGameList(), it then replaces any games with a null name with a empty string. It doesn't crash the program but still shows up as an empty title for the user to fix. How do I submit a pull request? (new to github)