Fix some memory leaks with WrappedText and LoadArrayByNameAsVec3s (#4144)

* avoid memory leaks with WrappedText

* avoid memory leak with LoadArrayByNameAsVec3s
This commit is contained in:
Archez
2024-05-09 21:39:13 -04:00
committed by GitHub
parent cbeec006ec
commit 3f67fed073
5 changed files with 14 additions and 11 deletions

View File

@@ -782,7 +782,7 @@ void DrawFlagTableArray16(const FlagTable& flagTable, uint16_t row, uint16_t& fl
ImGui::PopStyleColor();
if (ImGui::IsItemHovered() && hasDescription) {
ImGui::BeginTooltip();
ImGui::Text("%s", UIWidgets::WrappedText(flagTable.flagDescriptions.at(row * 16 + flagIndex), 60));
ImGui::Text("%s", UIWidgets::WrappedText(flagTable.flagDescriptions.at(row * 16 + flagIndex), 60).c_str());
ImGui::EndTooltip();
}
ImGui::PopID();