From 953b722fc577e4060581308b422afbef0246ef0e Mon Sep 17 00:00:00 2001 From: smnrgrs Date: Thu, 29 Feb 2024 14:34:09 +0000 Subject: [PATCH] Prevent crash when opening new tab for topic with multiple partitions --- src/main_window.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main_window.cpp b/src/main_window.cpp index 74e94b6..b472d40 100644 --- a/src/main_window.cpp +++ b/src/main_window.cpp @@ -213,7 +213,7 @@ void DDSMonitorMainWindow::on_topicTree_itemClicked(QTreeWidgetItem* item, int) if (!selectedPartition.isEmpty()) { partitionInfo.name.length(1); - partitionInfo.name[0] = selectedPartition.toUtf8().data(); + partitionInfo.name[0] = selectedPartition.toStdString().c_str(); } topicInfo->subQos.partition = partitionInfo;