mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-30 21:58:52 +02:00
Check for null error streams
This commit is contained in:
@@ -1218,11 +1218,13 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
|
||||
InputStream inputStream = (status == HttpsURLConnection.HTTP_OK
|
||||
? urlConnection.getInputStream() : urlConnection.getErrorStream());
|
||||
|
||||
BufferedReader br = new BufferedReader(new InputStreamReader(inputStream));
|
||||
if (inputStream != null) {
|
||||
BufferedReader br = new BufferedReader(new InputStreamReader(inputStream));
|
||||
|
||||
String line;
|
||||
while ((line = br.readLine()) != null)
|
||||
response.append(line);
|
||||
String line;
|
||||
while ((line = br.readLine()) != null)
|
||||
response.append(line);
|
||||
}
|
||||
|
||||
if (status == HttpsURLConnection.HTTP_FORBIDDEN) {
|
||||
// {"message":"API rate limit exceeded for ...","documentation_url":"https://developer.github.com/v3/#rate-limiting"}
|
||||
|
||||
Reference in New Issue
Block a user