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
faa12ab5
Commit
faa12ab5
authored
Jun 17, 2019
by
Jean-Baptiste Mardelle
Browse files
Fix crash deleting last track
Fixes
#263
parent
9d38c49c
Pipeline
#4403
passed with stage
in 20 minutes and 55 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
src/timeline2/model/timelinemodel.cpp
View file @
faa12ab5
...
...
@@ -2011,6 +2011,10 @@ bool TimelineModel::requestTrackDeletion(int trackId)
bool
TimelineModel
::
requestTrackDeletion
(
int
trackId
,
Fun
&
undo
,
Fun
&
redo
)
{
Q_ASSERT
(
isTrack
(
trackId
));
if
(
m_allTracks
.
size
()
<
2
)
{
pCore
->
displayMessage
(
i18n
(
"Cannot delete last track in timeline"
),
InformationMessage
,
500
);
return
false
;
}
std
::
vector
<
int
>
clips_to_delete
;
for
(
const
auto
&
it
:
getTrackById
(
trackId
)
->
m_allClips
)
{
clips_to_delete
.
push_back
(
it
.
first
);
...
...
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