OSDN Git Service

C# 8.0 のnull許容参照型を有効化
[opentween/open-tween.git] / OpenTween / UserInfo.cs
index fd94626..f11781d 100644 (file)
@@ -24,6 +24,8 @@
 // the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
 // Boston, MA 02110-1301, USA.
 
+#nullable enable
+
 using System;
 using System.Net;
 using OpenTween.Api.DataModel;
@@ -51,7 +53,7 @@ namespace OpenTween
             {
                 this.ImageUrl = null;
             }
-            this.Url = user.Url;
+            this.Url = user.Url ?? "";
             this.Protect = user.Protected;
             this.FriendsCount = user.FriendsCount;
             this.FollowersCount = user.FollowersCount;
@@ -70,7 +72,7 @@ namespace OpenTween
         public string ScreenName = "";
         public string Location = "";
         public string Description = "";
-        public Uri ImageUrl = null;
+        public Uri? ImageUrl = null;
         public string Url = "";
         public bool Protect = false;
         public int FriendsCount = 0;