null pointer

This commit is contained in:
emrah88 2018-01-15 17:10:54 +01:00
parent 5c8e1bd6d4
commit 12f93b5463

View File

@ -49,7 +49,7 @@ public class DataSourceUtil {
}
public static DataSource.Factory getDefaultDataSourceFactory(Context context, DefaultBandwidthMeter bandwidthMeter, Map<String, String> requestHeaders) {
if (defaultDataSourceFactory == null || !requestHeaders.isEmpty()) {
if (defaultDataSourceFactory == null || (requestHeaders != null && !requestHeaders.isEmpty())) {
defaultDataSourceFactory = buildDataSourceFactory(context, bandwidthMeter, requestHeaders);
}
return defaultDataSourceFactory;