1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-12-01 06:22:55 +01:00

Bangle.js: Fix null pointer issue if headers not supplied for HTTP request

This commit is contained in:
Gordon Williams 2022-08-24 20:26:25 +01:00
parent 02dca611b0
commit 0f052f5467

View File

@ -629,11 +629,13 @@ public class BangleJSDeviceSupport extends AbstractBTLEDeviceSupport {
@Override @Override
public Map<String, String> getHeaders() throws AuthFailureError { public Map<String, String> getHeaders() throws AuthFailureError {
Map<String, String> h = super.getHeaders(); Map<String, String> h = super.getHeaders();
Iterator<String> iter = headers.keySet().iterator(); if (headers != null) {
while (iter.hasNext()) { Iterator<String> iter = headers.keySet().iterator();
String key = iter.next(); while (iter.hasNext()) {
String value = headers.get(key); String key = iter.next();
h.put(key, value); String value = headers.get(key);
h.put(key, value);
}
} }
return h; return h;
} }