[LayaAir 2.0]微信小游戏最小化以后,引擎库里面_parseLines报错

微信小游戏最小化以后,如果有界面再最小化期间创建,则_parseLines必挂,,
_parseLines函数li里面的
if (Render.isConchApp){
                measureResult=/*__JS__ */window.conchTextCanvas.measureText(this._testWord);
                }else {
                measureResult=Browser.context.measureText(Text._testWord);
            }
            this._charSize.width=measureResult.width;
            this._charSize.height=(measureResult.height || this.fontSize);
这些会挂,

72cec55f50b578c77d02186fb7810cf.jpg

 用的laya2.0 正式版
已邀请:

Aar0n

赞同来自:

if (Render.isConchApp){
                measureResult=/*__JS__ */window.conchTextCanvas.measureText(this._testWord);
                }else {
                measureResult=Browser.context.measureText(Text._testWord);
            }
if (!measureResult) measureResult = {width:100 }; //加上这一行异常处理
            this._charSize.width=measureResult.width;
            this._charSize.height=(measureResult.height || this.fontSize);

要回复问题请先

商务合作
商务合作