Skip to content

Commit

Permalink
fix build issue
Browse files Browse the repository at this point in the history
  • Loading branch information
devernay committed Jun 9, 2021
1 parent 9ae2143 commit f718e6b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Gui/KnobUndoCommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,10 @@ RestoreDefaultsCommand::undo()
std::list<SequenceTime> times;
KnobIPtr first = _knobs.front().lock();
KnobHolder* holder = first ? first->getHolder() : nullptr;
AppInstancePtr app = holder ? holder->getApp() : nullptr;
AppInstancePtr app;
if (holder) {
app = holder->getApp();
}
assert(app);
std::list<KnobIPtr>::iterator itClone = _clones.begin();
for (std::list<KnobIWPtr>::const_iterator it = _knobs.begin(); it != _knobs.end(); ++it, ++itClone) {
Expand Down Expand Up @@ -602,7 +605,7 @@ RestoreDefaultsCommand::redo()
{
std::list<SequenceTime> times;
KnobIPtr first = _knobs.front().lock();
AppInstancePtr app = nullptr;
AppInstancePtr app;
KnobHolder* holder = first ? first->getHolder() : nullptr;
EffectInstance* isEffect = dynamic_cast<EffectInstance*>(holder);

Expand Down

0 comments on commit f718e6b

Please sign in to comment.