Commit 3900a325 authored by Wolthera van Hövell's avatar Wolthera van Hövell 🔤
Browse files

BUG:404521 Check if animation config exists before accessing it's contents.

This fixes a bug where exporting exr frames caused a crash.
parent 0b5c34c4
......@@ -104,17 +104,19 @@ void AnimaterionRenderer::slotRenderAnimation()
* Check if the dimensions make sense before we even try to batch save.
*/
KisPropertiesConfigurationSP encoderConfig = dlgAnimationRenderer.getEncoderConfiguration();
if ((image->height()%2 || image->width()%2)
&& (encoderConfig->getString("mimetype") == "video/mp4" ||
encoderConfig->getString("mimetype") == "video/x-matroska")) {
QString m = "Mastroska (.mkv)";
if (encoderConfig->getString("mimetype")== "video/mp4") {
m = "Mpeg4 (.mp4)";
if (encoderConfig) {
if ((image->height()%2 || image->width()%2)
&& (encoderConfig->getString("mimetype") == "video/mp4" ||
encoderConfig->getString("mimetype") == "video/x-matroska")) {
QString m = "Mastroska (.mkv)";
if (encoderConfig->getString("mimetype")== "video/mp4") {
m = "Mpeg4 (.mp4)";
}
qWarning() << m <<"requires width and height to be even, resize and try again!";
doc->setErrorMessage(i18n("%1 requires width and height to be even numbers. Please resize or crop the image before exporting.", m));
QMessageBox::critical(0, i18nc("@title:window", "Krita"), i18n("Could not render animation:\n%1", doc->errorMessage()));
return;
}
qWarning() << m <<"requires width and height to be even, resize and try again!";
doc->setErrorMessage(i18n("%1 requires width and height to be even numbers. Please resize or crop the image before exporting.", m));
QMessageBox::critical(0, i18nc("@title:window", "Krita"), i18n("Could not render animation:\n%1", doc->errorMessage()));
return;
}
const bool batchMode = false; // TODO: fetch correctly!
......
Supports Markdown
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