Fixed null reference for redefining range transitions

This commit is contained in:
John Jenko 2014-03-20 14:19:41 +00:00
parent 316a0f5cf2
commit 9a0ffef782

View File

@ -802,7 +802,13 @@ namespace Volian.Controls.Library
// if doing a 'new' range, no node is selected in tree. Without this, the first node in the // if doing a 'new' range, no node is selected in tree. Without this, the first node in the
// tree was the selected node which was throwing off the logic for defining the _RangeNode1 // tree was the selected node which was throwing off the logic for defining the _RangeNode1
// and _RangeNode2 // and _RangeNode2
if (_DoingRange) tvTran.SelectedNode = null; if (_DoingRange)
{
tvTran.SelectedNode = null;
// if there was an existing range clear the range because the section selection had changed
// and these range values are no longer valid.
if (_RangeNode1 != null || _RangeNode2 != null) _RangeNode1 = _RangeNode2 = null;
}
_InitializingTrans = false; _InitializingTrans = false;
} }
} }