Skip to content

Commit

Permalink
fix: crash on character export
Browse files Browse the repository at this point in the history
  • Loading branch information
sithlord48 committed May 28, 2024
1 parent 5e2164a commit bbfa776
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/dialogs/bcdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ QString BCDialog::getExistingDirectory(QWidget *parent, const QString &title, co

QString BCDialog::getSaveFileName(QWidget *parent, const QString &region, const QString &title, const QString &path , const QString &nameFilters, QString* chosenType, const QString &initSelection)
{
if(chosenType == nullptr) {
QString filter = nameFilters.mid(0, (nameFilters.indexOf(";;") - 2));
chosenType = &filter;
}

auto dialog = getFileDialog(parent, title, path, nameFilters, initSelection);
dialog->setFileMode(QFileDialog::AnyFile);
dialog->setAcceptMode(QFileDialog::AcceptSave);
Expand Down

0 comments on commit bbfa776

Please sign in to comment.