Skip to content

Commit 20ea2dc

Browse files
committed
fix #4199
1 parent 7f1aefe commit 20ea2dc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

gsyVideoPlayer-java/src/main/java/com/shuyu/gsyvideoplayer/video/base/GSYBaseVideoPlayer.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -936,6 +936,10 @@ public GSYVideoPlayer getFullWindowPlayer() {
936936
*/
937937
@SuppressWarnings("ResourceType")
938938
public GSYVideoPlayer getSmallWindowPlayer() {
939+
Activity activity = CommonUtil.scanForActivity(getContext());
940+
if (activity == null) {
941+
return null;
942+
}
939943
ViewGroup vp = (ViewGroup) (CommonUtil.scanForActivity(getContext())).findViewById(Window.ID_ANDROID_CONTENT);
940944
final View small = vp.findViewById(getSmallId());
941945
GSYVideoPlayer gsyVideoPlayer = null;

0 commit comments

Comments
 (0)