Skip to content

Commit f211adf

Browse files
committed
Fix NullPointerException in CustomThemeV2
Add a null check for `textView` before setting the text color to prevent a potential crash. Signed-off-by: Dev4Mod <[email protected]>
1 parent 47f259b commit f211adf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/src/main/java/com/wmods/wppenhacer/xposed/features/customization/CustomThemeV2.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,9 @@ protected void afterHookedMethod(MethodHookParam param) throws Throwable {
261261
protected void afterHookedMethod(MethodHookParam param) throws Throwable {
262262
var view = (View) param.args[0];
263263
var textView = (TextView) view.findViewById(Utils.getID("text_view", "id"));
264-
textView.setTextColor(DesignUtils.getPrimaryTextColor());
264+
if (textView != null) {
265+
textView.setTextColor(DesignUtils.getPrimaryTextColor());
266+
}
265267
}
266268
});
267269

0 commit comments

Comments
 (0)