Skip to content

Commit 8c06610

Browse files
authored
In DefaultLottieFetchResult, catch NPE from getErrorFromConnection() (#2643)
Fixes #2642
1 parent d5eb124 commit 8c06610

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lottie/src/main/java/com/airbnb/lottie/network/DefaultLottieFetchResult.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public DefaultLottieFetchResult(@NonNull HttpURLConnection connection) {
4242
try {
4343
return isSuccessful() ? null :
4444
"Unable to fetch " + connection.getURL() + ". Failed with " + connection.getResponseCode() + "\n" + getErrorFromConnection(connection);
45-
} catch (IOException e) {
45+
} catch (IOException | NullPointerException e) {
4646
Logger.warning("get error failed ", e);
4747
return e.getMessage();
4848
}

0 commit comments

Comments
 (0)