From 0baa1c18336325044dc16f4590322788f918091e Mon Sep 17 00:00:00 2001 From: Ivandro Ismael Date: Fri, 1 Jan 2016 15:11:15 +0000 Subject: [PATCH] Merge conditions --- src/Controls/SubtitleListView.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Controls/SubtitleListView.cs b/src/Controls/SubtitleListView.cs index 3c49b7ff3..4e88372db 100644 --- a/src/Controls/SubtitleListView.cs +++ b/src/Controls/SubtitleListView.cs @@ -626,9 +626,7 @@ namespace Nikse.SubtitleEdit.Controls public void SelectIndexAndEnsureVisible(int index, bool focus) { - if (!IsValidIndex(index)) - return; - if (TopItem == null) + if (!IsValidIndex(index) || TopItem == null) return; int bottomIndex = TopItem.Index + ((Height - 25) / 16);