Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Graphics
Krita
Commits
3900a325
Commit
3900a325
authored
Feb 22, 2019
by
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
plugins/extensions/animationrenderer/AnimationRenderer.cpp
View file @
3900a325
...
...
@@ -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!
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment