From f718e6b4ee0075c65b8fc0e29ef9e2a9536792b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Devernay?= Date: Wed, 9 Jun 2021 10:29:47 -0700 Subject: [PATCH] fix build issue --- Gui/KnobUndoCommand.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Gui/KnobUndoCommand.cpp b/Gui/KnobUndoCommand.cpp index 179c84a60b..75e67544dd 100644 --- a/Gui/KnobUndoCommand.cpp +++ b/Gui/KnobUndoCommand.cpp @@ -555,7 +555,10 @@ RestoreDefaultsCommand::undo() std::list 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::iterator itClone = _clones.begin(); for (std::list::const_iterator it = _knobs.begin(); it != _knobs.end(); ++it, ++itClone) { @@ -602,7 +605,7 @@ RestoreDefaultsCommand::redo() { std::list times; KnobIPtr first = _knobs.front().lock(); - AppInstancePtr app = nullptr; + AppInstancePtr app; KnobHolder* holder = first ? first->getHolder() : nullptr; EffectInstance* isEffect = dynamic_cast(holder);