Skip to content

Commit ef3837c

Browse files
Fix possible node crash in HTML rendering code (#13408)
1 parent fd6de4a commit ef3837c

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

ydb/core/blobstorage/nodewarden/node_warden_mon.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -346,12 +346,13 @@ void TNodeWarden::RenderLocalDrives(IOutputStream& out) {
346346
TABLED() { out << (initialData ? "true" : "<b style='color: red'>false</b>"); }
347347
TABLED() { out << (onlineData ? "true" : "<b style='color: red'>false</b>"); }
348348
NPDisk::TDriveData *data = initialData ? initialData : onlineData ? onlineData : nullptr;
349-
Y_ABORT_UNLESS(data);
350-
TABLED() { out << data->Path; }
351-
TABLED() { out << data->SerialNumber.Quote(); }
352-
TABLED() {
353-
out << NPDisk::DeviceTypeStr(data->DeviceType, true);
354-
out << (data->IsMock ? "(mock)" : "");
349+
if (data) {
350+
TABLED() { out << data->Path; }
351+
TABLED() { out << data->SerialNumber.Quote(); }
352+
TABLED() {
353+
out << NPDisk::DeviceTypeStr(data->DeviceType, true);
354+
out << (data->IsMock ? "(mock)" : "");
355+
}
355356
}
356357
}
357358
out << "\n";

0 commit comments

Comments
 (0)