Skip to content

Commit 4b5309c

Browse files
authored
Do not play on resume if the video is not loaded for CommonVideoPlayerDesktop
In the old implementation (where `load` & `play` were done together), `resume` would load and play the video. This change avoids a `NullPointerException` if calling `resume` before `load`.
1 parent 5c3549e commit 4b5309c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

gdx-video-desktop/src/com/badlogic/gdx/video/CommonVideoPlayerDesktop.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,9 @@ public void pause () {
297297

298298
@Override
299299
public void resume () {
300-
play();
300+
if (decoder != null) {
301+
play();
302+
}
301303
}
302304

303305
@Override

0 commit comments

Comments
 (0)