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
Multimedia
Kdenlive
Commits
81a54b54
Commit
81a54b54
authored
Mar 09, 2020
by
Jean-Baptiste Mardelle
Browse files
Fix possible crash on profile switch
parent
bfec04aa
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/doc/kdenlivedoc.cpp
View file @
81a54b54
...
...
@@ -1376,6 +1376,8 @@ void KdenliveDoc::resetProfile()
void
KdenliveDoc
::
slotSwitchProfile
(
const
QString
&
profile_path
)
{
// Discard all current jobs
pCore
->
jobManager
()
->
slotCancelJobs
();
pCore
->
setCurrentProfile
(
profile_path
);
updateProjectProfile
(
true
);
emit
docModified
(
true
);
...
...
@@ -1409,6 +1411,8 @@ void KdenliveDoc::switchProfile(std::unique_ptr<ProfileParam> &profile, const QS
switch
(
answer
)
{
case
KMessageBox
::
Yes
:
// Discard all current jobs
pCore
->
jobManager
()
->
slotCancelJobs
();
KdenliveSettings
::
setDefault_profile
(
profile
->
path
());
pCore
->
setCurrentProfile
(
profile
->
path
());
updateProjectProfile
(
true
);
...
...
@@ -1475,6 +1479,8 @@ void KdenliveDoc::switchProfile(std::unique_ptr<ProfileParam> &profile, const QS
.
arg
(
profile
->
m_height
)
.
arg
(
QString
::
number
((
double
)
profile
->
m_frame_rate_num
/
profile
->
m_frame_rate_den
,
'f'
,
2
));
QString
profilePath
=
ProfileRepository
::
get
()
->
saveProfile
(
profile
.
get
());
// Discard all current jobs
pCore
->
jobManager
()
->
slotCancelJobs
();
pCore
->
setCurrentProfile
(
profilePath
);
updateProjectProfile
(
true
);
emit
docModified
(
true
);
...
...
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