Skip to content

Commit dd3770c

Browse files
committed
URLStreamESP32: end() prevent npe
1 parent 96eca56 commit dd3770c

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/AudioTools/Communication/HTTP/URLStreamESP32.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,7 @@ class URLStreamESP32 : public AbstractURLStream {
282282
}
283283
// ends the request
284284
virtual void end() override {
285+
if (client_handle == nullptr) return;
285286
esp_http_client_close(client_handle);
286287
esp_http_client_cleanup(client_handle);
287288
client_handle = nullptr;

0 commit comments

Comments
 (0)