diff --git a/libscidavis/src/future/table/TableView.cpp b/libscidavis/src/future/table/TableView.cpp index 60231bb2..4f41cc53 100644 --- a/libscidavis/src/future/table/TableView.cpp +++ b/libscidavis/src/future/table/TableView.cpp @@ -728,8 +728,16 @@ void TableView::applyType() break; } col->setColumnMode(new_mode, converter); - static_cast(col->outputFilter())->setFormat(format); - static_cast(col->inputFilter())->setFormat(format); + { + auto filter = dynamic_cast(col->outputFilter()); + if (nullptr != filter) + filter->setFormat(format); + } + { + auto filter = dynamic_cast(col->inputFilter()); + if (nullptr != filter) + filter->setFormat(format); + } col->endMacro(); } break;