mirror of
https://github.com/s00500/ESPUI.git
synced 2025-08-01 19:05:31 +00:00
Add a null check in updateControl
This means that calling any updates before the GUI is created will now not cause a crash.
This commit is contained in:
@@ -763,6 +763,11 @@ void ESPUIClass::updateControl(Control* control, int clientId)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this->ws == nullptr)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
String json;
|
String json;
|
||||||
DynamicJsonDocument document(jsonUpdateDocumentSize);
|
DynamicJsonDocument document(jsonUpdateDocumentSize);
|
||||||
JsonObject root = document.to<JsonObject>();
|
JsonObject root = document.to<JsonObject>();
|
||||||
|
Reference in New Issue
Block a user