Merge conditions

This commit is contained in:
Ivandro Ismael 2016-01-01 15:11:15 +00:00
parent 8f129c1434
commit 0baa1c1833

View File

@ -626,9 +626,7 @@ namespace Nikse.SubtitleEdit.Controls
public void SelectIndexAndEnsureVisible(int index, bool focus) public void SelectIndexAndEnsureVisible(int index, bool focus)
{ {
if (!IsValidIndex(index)) if (!IsValidIndex(index) || TopItem == null)
return;
if (TopItem == null)
return; return;
int bottomIndex = TopItem.Index + ((Height - 25) / 16); int bottomIndex = TopItem.Index + ((Height - 25) / 16);