Skip to content

Commit

Permalink
fix crashes in Properties actions on missing clip
Browse files Browse the repository at this point in the history
  • Loading branch information
ddennedy committed May 2, 2023
1 parent 6d44ab7 commit adda517
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/widgets/avformatproducerwidget.cpp
Expand Up @@ -267,6 +267,17 @@ void AvformatProducerWidget::reloadProducerValues()
}
ui->rangeComboBox->setEnabled(true);

// Disable all actions if the file does not exist
auto exists = QFile::exists(resource);
ui->speedSpinBox->setEnabled(exists);
ui->speedComboBox->setEnabled(exists);
ui->applySpeedButton->setEnabled(exists);
ui->durationSpinBox->setEnabled(exists);
ui->menuButton->setEnabled(exists);
ui->convertButton->setEnabled(exists);
ui->reverseButton->setEnabled(exists);
ui->proxyButton->setEnabled(exists);

// populate the track combos
int n = m_producer->get_int("meta.media.nb_streams");
int videoIndex = 1;
Expand Down

0 comments on commit adda517

Please sign in to comment.