OSDN Git Service

ShowUserInfoでdescriptionがNullableであることを想定していない問題を修正
authorKimura Youichi <kim.upsilon@bucyou.net>
Sun, 27 Apr 2014 16:11:46 +0000 (01:11 +0900)
committerKimura Youichi <kim.upsilon@bucyou.net>
Tue, 29 Apr 2014 23:29:57 +0000 (08:29 +0900)
OpenTween/ShowUserInfo.cs

index b395a55..b42ac86 100644 (file)
@@ -133,6 +133,24 @@ namespace OpenTween
             return true;
         }
 
+        private async Task SetDescriptionAsync(string descriptionText)
+        {
+            if (descriptionText != null)
+            {
+                var atlist = new List<string>();
+
+                var html = WebUtility.HtmlEncode(descriptionText);
+                html = await this.Twitter.CreateHtmlAnchorAsync(html, atlist, null);
+                html = this.Owner.createDetailHtml(html);
+
+                this.DescriptionBrowser.DocumentText = html;
+            }
+            else
+            {
+                this.DescriptionBrowser.DocumentText = "";
+            }
+        }
+
         private async Task SetUserImageAsync(string imageUri)
         {
             var oldImage = this.UserPicture.Image;
@@ -161,15 +179,6 @@ namespace OpenTween
             LinkLabelWeb.Text = data;
         }
 
-        private async Task SetDescriptionAsync(string descriptionText)
-        {
-            var html = WebUtility.HtmlEncode(descriptionText);
-            html = await this.Twitter.CreateHtmlAnchorAsync(html, this.atlist, null);
-            html = this.Owner.createDetailHtml(html);
-
-            this.DescriptionBrowser.DocumentText = html;
-        }
-
         private async Task SetRecentStatusAsync(TwitterDataModel.Status status)
         {
             var atlist = new List<string>();