summaryrefslogtreecommitdiffstats
path: root/win/C#/frmQueue.cs
diff options
context:
space:
mode:
Diffstat (limited to 'win/C#/frmQueue.cs')
-rw-r--r--win/C#/frmQueue.cs14
1 files changed, 9 insertions, 5 deletions
diff --git a/win/C#/frmQueue.cs b/win/C#/frmQueue.cs
index bc45d31b8..a08591c51 100644
--- a/win/C#/frmQueue.cs
+++ b/win/C#/frmQueue.cs
@@ -24,11 +24,15 @@ namespace Handbrake
private void btn_q_encoder_Click(object sender, EventArgs e)
{
- progressBar.Value = 0;
- lbl_progressValue.Text = "0 %";
- progressBar.Step = 100 / list_queue.Items.Count;
- progressBar.Update();
- ThreadPool.QueueUserWorkItem(startProc);
+ if (list_queue.Items.Count != 0)
+ {
+ progressBar.Value = 0;
+ lbl_progressValue.Text = "0 %";
+ progressBar.Step = 100 / list_queue.Items.Count;
+ progressBar.Update();
+ ThreadPool.QueueUserWorkItem(startProc);
+ }
+
}
[DllImport("user32.dll")]