We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dab9ac2 commit 8627643Copy full SHA for 8627643
lib/src/main/java/com/otaliastudios/transcoder/source/DataSourceWrapper.java
@@ -96,13 +96,16 @@ public void releaseTrack(@NonNull TrackType type) {
96
97
@Override
98
public boolean isInitialized() {
99
- return mSource.isInitialized();
+ return mSource != null && mSource.isInitialized();
100
}
101
102
103
public void initialize() {
104
// Make it easier for subclasses to put their logic in initialize safely.
105
- if (!mSource.isInitialized()) {
+ if (!isInitialized()) {
106
+ if (mSource == null) {
107
+ throw new NullPointerException("DataSourceWrapper's source is not set!");
108
+ }
109
mSource.initialize();
110
111
0 commit comments