diff --git a/apps/opencs/view/filter/editwidget.cpp b/apps/opencs/view/filter/editwidget.cpp index d3b4af4e3c..46c996cee4 100644 --- a/apps/opencs/view/filter/editwidget.cpp +++ b/apps/opencs/view/filter/editwidget.cpp @@ -240,9 +240,14 @@ std::string CSVFilter::EditWidget::generateFilter(const FilterData& filterData, std::string quotesResolved; if (std::get_if(&filterData.searchData)) - quotesResolved = *(std::get_if(&filterData.searchData)); + quotesResolved = std::get(filterData.searchData); + else + { + Log(Debug::Warning) << "Generating record filter failed."; + return ""; + } if (stringOrValue == "string") - quotesResolved = '"' + std::get(filterData.searchData) + '"'; + quotesResolved = '"' + quotesResolved + '"'; std::stringstream ss; if (multipleColumns) diff --git a/apps/opencs/view/filter/filterbox.cpp b/apps/opencs/view/filter/filterbox.cpp index 10ba95a55c..e79b83ed51 100644 --- a/apps/opencs/view/filter/filterbox.cpp +++ b/apps/opencs/view/filter/filterbox.cpp @@ -12,8 +12,6 @@ #include "filterdata.hpp" #include "recordfilterbox.hpp" -#include - #include #include #include diff --git a/apps/opencs/view/world/tablesubview.cpp b/apps/opencs/view/world/tablesubview.cpp index 8646ba16a3..7165722a82 100644 --- a/apps/opencs/view/world/tablesubview.cpp +++ b/apps/opencs/view/world/tablesubview.cpp @@ -17,8 +17,6 @@ #include -#include - #include "../../model/doc/document.hpp" #include "../../model/world/tablemimedata.hpp"