summaryrefslogtreecommitdiffstats
path: root/win/C#
diff options
context:
space:
mode:
authorsr55 <[email protected]>2010-09-12 19:43:27 +0000
committersr55 <[email protected]>2010-09-12 19:43:27 +0000
commitac533e33e5531f7909bdf67e3c9b6236ac465104 (patch)
treee391d8ba1c83615e245d4fcd82fc7a034d7594e4 /win/C#
parent88cbe6831867d5c1443f6308231ee0c190b0284c (diff)
WinGui:
- Fix a crash in the Auto-Naming function caused by empty string in the title name. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3523 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#')
-rw-r--r--win/C#/Functions/Main.cs9
1 files changed, 6 insertions, 3 deletions
diff --git a/win/C#/Functions/Main.cs b/win/C#/Functions/Main.cs
index 4fc0496ef..11e6be932 100644
--- a/win/C#/Functions/Main.cs
+++ b/win/C#/Functions/Main.cs
@@ -808,9 +808,12 @@ namespace Handbrake.Functions
StringBuilder sb = new StringBuilder(input.Length);
foreach (string s in tokens)
{
- sb.Append(s[0].ToString().ToUpper());
- sb.Append(s.Substring(1).ToLower());
- sb.Append(" ");
+ if (!string.IsNullOrEmpty(s))
+ {
+ sb.Append(s[0].ToString().ToUpper());
+ sb.Append(s.Substring(1).ToLower());
+ sb.Append(" ");
+ }
}
return sb.ToString().Trim();