mirror of
https://github.com/s00500/ESPUI.git
synced 2024-11-21 22:50:55 +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:
parent
3b8f71a0f5
commit
254912aee5
@ -763,6 +763,11 @@ void ESPUIClass::updateControl(Control* control, int clientId)
|
||||
return;
|
||||
}
|
||||
|
||||
if (this->ws == nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
String json;
|
||||
DynamicJsonDocument document(jsonUpdateDocumentSize);
|
||||
JsonObject root = document.to<JsonObject>();
|
||||
|
Loading…
Reference in New Issue
Block a user