]> git.sesse.net Git - vlc/commitdiff
skins2: first check for playout existence (generic control)
authorErwan Tulou <erwan10@videolan.org>
Mon, 8 Apr 2013 09:49:13 +0000 (11:49 +0200)
committerErwan Tulou <erwan10@videolan.org>
Mon, 8 Apr 2013 09:55:31 +0000 (11:55 +0200)
modules/gui/skins2/controls/ctrl_generic.cpp

index 7bded8c3b29bb64679013df125ba8a2b8ef0a608..c821b0823c1546566aaf8853c7c0eb11dff439cd 100644 (file)
@@ -76,12 +76,12 @@ void CtrlGeneric::unsetLayout()
 void CtrlGeneric::notifyLayout( int width, int height,
                                 int xOffSet, int yOffSet )
 {
-    width = ( width > 0 ) ? width : m_pPosition->getWidth();
-    height = ( height > 0 ) ? height : m_pPosition->getHeight();
-
     // Notify the layout
     if( m_pLayout )
     {
+        width = ( width > 0 ) ? width : m_pPosition->getWidth();
+        height = ( height > 0 ) ? height : m_pPosition->getHeight();
+
         m_pLayout->onControlUpdate( *this, width, height, xOffSet, yOffSet );
     }
 }