1
0
mirror of synced 2024-11-28 17:40:51 +01:00

fix: Crash after evaluating patterns a second time

This commit is contained in:
WerWolv 2022-11-10 11:18:14 +01:00
parent 7f0bdea212
commit c90aa0a742

View File

@ -520,6 +520,9 @@ namespace hex::plugin::builtin::ui {
auto sortSpecs = ImGui::TableGetSortSpecs();
if (patterns.empty())
sortedPatterns.clear();
if (!patterns.empty() && (sortSpecs->SpecsDirty || sortedPatterns.empty())) {
sortedPatterns.clear();
std::transform(patterns.begin(), patterns.end(), std::back_inserter(sortedPatterns), [](const std::shared_ptr<pl::ptrn::Pattern> &pattern) {