Commit 8267d062 authored by Kevin Funk's avatar Kevin Funk
Browse files

Move assert to top of statement list

CCBUG: 258741
parent e8359fcd
......@@ -298,6 +298,11 @@ Context::Applet::collapse( bool on )
return;
}
ContextView *v = static_cast<ContextView*>( view() );
// Plasma::Applet::view() might return 0, if the widget is not yet constructed, etc.
// \sa https://bugs.kde.org/show_bug.cgi?id=258741
DEBUG_ASSERT(v, return)
// debug() << pluginName() << (on ? "collapsing to" : "uncollapsing to") << finalHeight;
QPropertyAnimation *pan = m_animation.data();
if( !pan )
......@@ -312,10 +317,6 @@ Context::Applet::collapse( bool on )
m_animation = pan;
pan->setDirection( QAbstractAnimation::Forward );
ContextView *v = static_cast<ContextView*>( view() );
// Plasma::Applet::view() might return 0, if the widget is not yet constructed, etc.
// \sa https://bugs.kde.org/show_bug.cgi?id=258741
DEBUG_ASSERT(v, return)
v->addCollapseAnimation( pan );
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment