From b82c87d5d601504526d72ee1c2536fc93805ba22 Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Sun, 29 Jan 2023 10:12:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=94=A8=E6=88=B7=E5=90=8D?= =?UTF-8?q?=E7=89=87=E6=B8=B2=E6=9F=93=E7=94=A8=E6=88=B7=E7=AD=89=E7=BA=A7?= =?UTF-8?q?=E6=97=B6=E6=89=80=E4=BD=BF=E7=94=A8=E7=9A=84Activity=E8=A2=AB?= =?UTF-8?q?=E9=94=80=E6=AF=81=E5=AF=BC=E8=87=B4=E7=9A=84=E9=97=AA=E9=80=80?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/yunbao/live/utils/LiveTextRender.java | 6 ++++++ 1 file changed, 6 insertions(+) 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) {