Skip to content

Commit

Permalink
Fix possible node crash in HTML rendering code (#13408)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexv-smirnov authored Jan 15, 2025
1 parent fd6de4a commit ef3837c
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions ydb/core/blobstorage/nodewarden/node_warden_mon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -346,12 +346,13 @@ void TNodeWarden::RenderLocalDrives(IOutputStream& out) {
TABLED() { out << (initialData ? "true" : "<b style='color: red'>false</b>"); }
TABLED() { out << (onlineData ? "true" : "<b style='color: red'>false</b>"); }
NPDisk::TDriveData *data = initialData ? initialData : onlineData ? onlineData : nullptr;
Y_ABORT_UNLESS(data);
TABLED() { out << data->Path; }
TABLED() { out << data->SerialNumber.Quote(); }
TABLED() {
out << NPDisk::DeviceTypeStr(data->DeviceType, true);
out << (data->IsMock ? "(mock)" : "");
if (data) {
TABLED() { out << data->Path; }
TABLED() { out << data->SerialNumber.Quote(); }
TABLED() {
out << NPDisk::DeviceTypeStr(data->DeviceType, true);
out << (data->IsMock ? "(mock)" : "");
}
}
}
out << "\n";
Expand Down

0 comments on commit ef3837c

Please sign in to comment.