diff --git a/platform/android/src/file_source.cpp b/platform/android/src/file_source.cpp index 612619a30b0..d8d715dbd3b 100644 --- a/platform/android/src/file_source.cpp +++ b/platform/android/src/file_source.cpp @@ -70,14 +70,16 @@ void FileSource::resume(jni::JNIEnv&) { activationCounter.value()++; if (activationCounter == 1) { - fileSource->resume(); + fileSource->resume(); } } void FileSource::pause(jni::JNIEnv&) { - activationCounter.value()--; - if (activationCounter == 0) { - fileSource->pause(); + if (activationCounter) { + activationCounter.value()--; + if (activationCounter == 0) { + fileSource->pause(); + } } }