Commit 22cd5006 authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Fix crash on folder import

Fixes #624
parent b300d6a7
Pipeline #18095 passed with stage
in 9 minutes and 14 seconds
...@@ -404,7 +404,7 @@ void ClipCreationDialog::createClipsCommand(KdenliveDoc *doc, const QString &par ...@@ -404,7 +404,7 @@ void ClipCreationDialog::createClipsCommand(KdenliveDoc *doc, const QString &par
// Check for image sequence // Check for image sequence
const QUrl &url = list.at(0); const QUrl &url = list.at(0);
QString fileName = url.fileName().section(QLatin1Char('.'), 0, -2); QString fileName = url.fileName().section(QLatin1Char('.'), 0, -2);
if (fileName.at(fileName.size() - 1).isDigit()) { if (!fileName.isEmpty() && fileName.at(fileName.size() - 1).isDigit()) {
KFileItem item(url); KFileItem item(url);
if (item.mimetype().startsWith(QLatin1String("image"))) { if (item.mimetype().startsWith(QLatin1String("image"))) {
// import as sequence if we found more than one image in the sequence // import as sequence if we found more than one image in the sequence
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment