Skip to content
This repository has been archived by the owner on Sep 15, 2024. It is now read-only.

Commit

Permalink
fix: NullPointerException in refreshCache
Browse files Browse the repository at this point in the history
  • Loading branch information
mkx173 committed Jul 23, 2024
1 parent 31945a5 commit 473e04e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/src/main/java/gm/tieba/tabswitch/dao/Adp.kt
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ object Adp : XposedContext() {
hookBeforeMethod("tbclient.ForumRecommend.DataRes\$Builder",
"build", Boolean::class.javaPrimitiveType) { param ->
val forums: MutableSet<String?> = HashSet()
val likeForumList = XposedHelpers.getObjectField(param.thisObject, "like_forum") as List<*>
likeForumList.forEach { forums.add(XposedHelpers.getObjectField(it, "forum_name") as String) }
val likeForumList = XposedHelpers.getObjectField(param.thisObject, "like_forum") as? List<*>
likeForumList?.forEach { forums.add(XposedHelpers.getObjectField(it, "forum_name") as String) }
putLikeForum(forums)
}
}
Expand Down

0 comments on commit 473e04e

Please sign in to comment.