Skip to content
This repository has been archived by the owner on Feb 26, 2023. It is now read-only.

Commit

Permalink
Merge pull request #3 from PaulWoitaschek/patch-1
Browse files Browse the repository at this point in the history
Prevent NPE when getCurrentPosition is called in idle state.
  • Loading branch information
mfietz committed Jan 6, 2016
2 parents 991d8a6 + d81278c commit a6ee8c1
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ public float getCurrentPitchStepsAdjustment() {
public int getCurrentPosition() {
switch (mCurrentState) {
case STATE_ERROR:
case STATE_IDLE:
case STATE_INITIALIZED:
return 0;
default:
return (int) (mExtractor.getSampleTime() / 1000);
Expand Down

0 comments on commit a6ee8c1

Please sign in to comment.