[into][osx] Don't crash when the user doesn't have a unix username set
This commit is contained in:
parent
5f7dea0c85
commit
bf94c6724e
|
@ -76,6 +76,9 @@ namespace SparkleShare {
|
||||||
UserInfoForm.IntercellSpacing = new SizeF (4, 4);
|
UserInfoForm.IntercellSpacing = new SizeF (4, 4);
|
||||||
|
|
||||||
string full_name = new UnixUserInfo (UnixEnvironment.UserName).RealName;
|
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 [0].StringValue = full_name.TrimEnd (",".ToCharArray());;
|
||||||
UserInfoForm.Cells [1].StringValue = SparkleShare.Controller.UserEmail;
|
UserInfoForm.Cells [1].StringValue = SparkleShare.Controller.UserEmail;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue