mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-28 12:56:49 +01:00
Bangle.js: Fix null pointer issue if headers not supplied for HTTP request
This commit is contained in:
parent
02dca611b0
commit
0f052f5467
@ -629,11 +629,13 @@ public class BangleJSDeviceSupport extends AbstractBTLEDeviceSupport {
|
||||
@Override
|
||||
public Map<String, String> getHeaders() throws AuthFailureError {
|
||||
Map<String, String> h = super.getHeaders();
|
||||
Iterator<String> iter = headers.keySet().iterator();
|
||||
while (iter.hasNext()) {
|
||||
String key = iter.next();
|
||||
String value = headers.get(key);
|
||||
h.put(key, value);
|
||||
if (headers != null) {
|
||||
Iterator<String> iter = headers.keySet().iterator();
|
||||
while (iter.hasNext()) {
|
||||
String key = iter.next();
|
||||
String value = headers.get(key);
|
||||
h.put(key, value);
|
||||
}
|
||||
}
|
||||
return h;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user