Fix crash in Qt GUI for movie player file path parser.

This commit is contained in:
harry 2023-01-21 11:59:56 -05:00
parent 821e82a069
commit 26f623f5ea
2 changed files with 9 additions and 4 deletions

View File

@ -222,6 +222,8 @@ int parseFilepath( const char *filepath, std::string *dir, std::string *base, st
{
suffix->assign( &filepath[j] );
}
if (base)
{
i = base->find_last_of('.');
if ( i != std::string::npos )
@ -229,6 +231,7 @@ int parseFilepath( const char *filepath, std::string *dir, std::string *base, st
base->erase(i);
}
}
}
return 0;
}
//---------------------------------------------------------------------------

View File

@ -65,6 +65,8 @@ MoviePlayDialog_t::MoviePlayDialog_t(QWidget *parent)
movSelBox = new QComboBox();
movBrowseBtn = new QPushButton(tr("Browse"));
movSelBox->setMaximumWidth(512);
hbox->addWidget(lbl, 1);
hbox->addWidget(movSelBox, 100);
hbox->addWidget(movBrowseBtn, 1);