Skip to content

Commit 0cdd170

Browse files
authoredNov 4, 2019
Merge pull request #18 from dubit/unity_downloadhandler_fix
Unity downloadhandler fix
2 parents 345977d + e5cfd59 commit 0cdd170

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎Scripts/Service/Unity/UnityHttpService.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ private static HttpResponse CreateResponse(UnityWebRequest unityWebRequest)
120120
return new HttpResponse
121121
{
122122
Url = unityWebRequest.url,
123-
Bytes = unityWebRequest.downloadHandler.data,
124-
Text = unityWebRequest.downloadHandler.text,
123+
Bytes = unityWebRequest.downloadHandler?.data,
124+
Text = unityWebRequest.downloadHandler?.text,
125125
IsSuccessful = !unityWebRequest.isHttpError && !unityWebRequest.isNetworkError,
126126
IsHttpError = unityWebRequest.isHttpError,
127127
IsNetworkError = unityWebRequest.isNetworkError,

0 commit comments

Comments
 (0)
Please sign in to comment.