Skip to content

Commit 4e7fcd0

Browse files
committed
DPL GUI: handle empty service.name in GUI
Apparently printing an empty string does not always works.
1 parent ad659e2 commit 4e7fcd0

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

Framework/GUISupport/src/FrameworkGUIDeviceInspector.cxx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,11 @@ void servicesTable(const char* label, std::vector<ServiceSpec> const& services)
154154
ImGui::NextColumn();
155155
}
156156
for (auto& service : services) {
157-
ImGui::TextUnformatted(service.name.c_str());
157+
if (!service.name.empty()) {
158+
ImGui::TextUnformatted(service.name.c_str());
159+
} else {
160+
ImGui::TextUnformatted("unknown");
161+
}
158162
ImGui::NextColumn();
159163
switch (service.kind) {
160164
case ServiceKind::Serial:

0 commit comments

Comments
 (0)