From 01d188d3a1ad5455e6b538fac3a67e1008f7d4c6 Mon Sep 17 00:00:00 2001 From: Nikolaj Olsson Date: Tue, 14 Mar 2017 16:23:25 +0100 Subject: [PATCH 1/2] Fix possible crash in "Batch convert" - thx FreezinG117 :) Fix #2287 --- src/Controls/SubtitleListView.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Controls/SubtitleListView.cs b/src/Controls/SubtitleListView.cs index cb87d61204..5ea6f639c1 100644 --- a/src/Controls/SubtitleListView.cs +++ b/src/Controls/SubtitleListView.cs @@ -794,7 +794,10 @@ private void SubtitleListViewLastColumnFill(object sender, EventArgs e) { width += Columns[i].Width; } - Columns[Columns.Count - 1].Width = Width - (width + 25); + if (Columns.Count > 0) + { + Columns[Columns.Count - 1].Width = Width - (width + 25); + } } public void SaveFirstVisibleIndex() From e007059969ca8c4264efc09ff0decac48a65458f Mon Sep 17 00:00:00 2001 From: Ivandro Ismael Date: Tue, 14 Mar 2017 04:37:48 +0000 Subject: [PATCH 2/2] GetDictionaries] - Minor fix for cursor state. --- src/Forms/GetDictionaries.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Forms/GetDictionaries.cs b/src/Forms/GetDictionaries.cs index 88043e3f16..902ce9926f 100644 --- a/src/Forms/GetDictionaries.cs +++ b/src/Forms/GetDictionaries.cs @@ -122,7 +122,6 @@ private void buttonDownload_Click(object sender, EventArgs e) var wc = new WebClient { Proxy = Utilities.GetProxy() }; wc.DownloadDataCompleted += wc_DownloadDataCompleted; wc.DownloadDataAsync(new Uri(url)); - Cursor = Cursors.Default; } catch (Exception exception) { @@ -137,6 +136,7 @@ private void buttonDownload_Click(object sender, EventArgs e) private void wc_DownloadDataCompleted(object sender, DownloadDataCompletedEventArgs e) { + Cursor = Cursors.Default; if (e.Error != null && _xmlName == "Nikse.SubtitleEdit.Resources.HunspellDictionaries.xml.gz") { MessageBox.Show("Unable to connect to extensions.services.openoffice.org... Switching host - please re-try!");