Fixed crashes in the Choose Thing Type window when pressing certain keys while no Thing is selected

This commit is contained in:
MascaraSnake 2016-09-16 22:22:45 +02:00
parent 6252bdaaa7
commit a0c77248b7

View file

@ -1450,7 +1450,8 @@ namespace CodeImp.DoomBuilder.GZBuilder.Controls
int intNumber = 0;
TreeNode tnNewlySelectedNodeWithKeys = null;
switch(e.KeyCode)
if (tnMostRecentSelectedNode == null) tnMostRecentSelectedNode = this.Nodes[0];
switch (e.KeyCode)
{
case Keys.Down:
tnNewlySelectedNodeWithKeys = tnMostRecentSelectedNode.NextVisibleNode;