Skip to content

Commit e1c03d9

Browse files
committed
Add null check for process in hasPosition method
1 parent 7563f76 commit e1c03d9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main/java/de/labystudio/spotifyapi/platform/windows/WinSpotifyAPI.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,10 @@ public int getPosition() {
135135

136136
@Override
137137
public boolean hasPosition() {
138+
if (this.process == null) {
139+
return false;
140+
}
141+
138142
PlaybackAccessor playback = this.process.getPlaybackAccessor();
139143
return playback.hasTrackPosition();
140144
}

0 commit comments

Comments
 (0)