diff --git a/live/src/main/java/com/yunbao/live/utils/LiveTextRender.java b/live/src/main/java/com/yunbao/live/utils/LiveTextRender.java index ba96ab4b9..da83aca91 100644 --- a/live/src/main/java/com/yunbao/live/utils/LiveTextRender.java +++ b/live/src/main/java/com/yunbao/live/utils/LiveTextRender.java @@ -1,5 +1,6 @@ package com.yunbao.live.utils; +import android.app.Activity; import android.content.Context; import android.graphics.Bitmap; import android.graphics.Canvas; @@ -424,6 +425,11 @@ public class LiveTextRender { */ public void getLevelImage(Context mContext, int userLevel, ImgLoader.DrawableCallback callback) { mCallback = callback; + if(mContext instanceof Activity){ + if(((Activity)mContext).isDestroyed()){ + mContext=CommonAppContext.getTopActivity(); + } + } List models = new NewLevelManager(mContext).getNewLevelModels(); String imgUrl = "https://downs.yaoulive.com/level/user_lv1_bg.png"; for (NewLevelModel newLevelModel : models) {