This repository was archived by the owner on Jan 21, 2024. It is now read-only.
File tree 1 file changed +11
-4
lines changed
app/src/main/java/org/schabi/newpipe/fragments/detail
1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -1528,11 +1528,18 @@ public void handleResult(@NonNull final StreamInfo info) {
1528
1528
new Thread (() -> {
1529
1529
info .setDislikeCount (ReturnYouTubeDislikeUtils .getDislikes (getContext (), info ));
1530
1530
if (info .getDislikeCount () >= 0 ) {
1531
+ if (activity == null ) {
1532
+ return ;
1533
+ }
1531
1534
activity .runOnUiThread (() -> {
1532
- binding .detailThumbsDownCountView .setText (Localization
1533
- .shortCount (activity , info .getDislikeCount ()));
1534
- binding .detailThumbsDownCountView .setVisibility (View .VISIBLE );
1535
- binding .detailThumbsDownImgView .setVisibility (View .VISIBLE );
1535
+ if (binding != null && binding .detailThumbsDownCountView != null ) {
1536
+ binding .detailThumbsDownCountView .setText (Localization
1537
+ .shortCount (activity , info .getDislikeCount ()));
1538
+ binding .detailThumbsDownCountView .setVisibility (View .VISIBLE );
1539
+ }
1540
+ if (binding != null && binding .detailThumbsDownImgView != null ) {
1541
+ binding .detailThumbsDownImgView .setVisibility (View .VISIBLE );
1542
+ }
1536
1543
});
1537
1544
}
1538
1545
}).start ();
You can’t perform that action at this time.
0 commit comments