[into][osx] Don't crash when the user doesn't have a unix username set

This commit is contained in:
Hylke Bons 2011-04-06 07:24:20 -07:00
parent f9fcfac9de
commit 438405ecae

View file

@ -76,6 +76,9 @@ namespace SparkleShare {
UserInfoForm.IntercellSpacing = new SizeF (4, 4);
string full_name = new UnixUserInfo (UnixEnvironment.UserName).RealName;
if (string.IsNullOrEmpty (full_name))
full_name = "";
UserInfoForm.Cells [0].StringValue = full_name.TrimEnd (",".ToCharArray());;
UserInfoForm.Cells [1].StringValue = SparkleShare.Controller.UserEmail;