Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
VideoLAN
VLMC
Commits
ae642f47
Commit
ae642f47
authored
Jul 30, 2016
by
luyikei
Browse files
Fix possible memory leak in MainWorkflow::addEffect
parent
9323dde6
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/Workflow/MainWorkflow.cpp
View file @
ae642f47
...
...
@@ -339,11 +339,11 @@ MainWorkflow::linkClips( const QString& uuidA, const QString& uuidB )
QString
MainWorkflow
::
addEffect
(
const
QString
&
clipUuid
,
const
QString
&
effectId
)
{
EffectHelper
*
newEffect
=
nullptr
;
std
::
shared_ptr
<
EffectHelper
>
newEffect
;
try
{
newEffect
=
new
EffectHelper
(
effectId
);
newEffect
.
reset
(
new
EffectHelper
(
effectId
)
);
}
catch
(
Backend
::
InvalidServiceException
&
e
)
{
...
...
@@ -353,9 +353,7 @@ MainWorkflow::addEffect( const QString &clipUuid, const QString &effectId )
for
(
auto
clip
:
m_clips
)
if
(
clip
->
uuid
().
toString
()
==
clipUuid
)
{
trigger
(
new
Commands
::
Effect
::
Add
(
std
::
shared_ptr
<
EffectHelper
>
(
newEffect
),
clip
->
input
()
)
);
trigger
(
new
Commands
::
Effect
::
Add
(
newEffect
,
clip
->
input
()
)
);
return
newEffect
->
uuid
().
toString
();
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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