少年修仙传客户端代码仓库
client_Wu Xijin
2018-08-31 b0eb0b651fd83b91315a89495b602d080b3af567
3132  对游戏中一些可能出现的空引用异常进行保护
1个文件已修改
37 ■■■■■ 已修改文件
System/HttpRequest/HttpBehaviour.cs 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/HttpRequest/HttpBehaviour.cs
@@ -1,11 +1,11 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System;
using System.Net;
using System.Text;
using System.IO;
using System.Text;
using System.IO;
public class HttpBehaviour : MonoBehaviour
{
@@ -122,14 +122,25 @@
        if (getResult)
        {
            if (callBack != null)
            try
            {
                callBack(ok, message);
                callBack = null;
                DebugEx.LogFormat("Http 数据通信 {0},请求数据结果:{1},内容:{2}", this.url, ok, message);
                if (callBack != null)
                {
                    callBack(ok, message);
                }
            }
            catch (Exception ex)
            {
                Debug.Log(ex);
            }
            finally
            {
                callBack = null;
                Destroy(this.gameObject);
            }
            Destroy(this.gameObject);
        }
    }
@@ -194,5 +205,5 @@
        }
    }
}
}