[vlc-commits] skins: don't create a video control if no size provided

Erwan Tulou git at videolan.org
Thu Apr 4 17:39:54 CEST 2013


vlc | branch: master | Erwan Tulou <erwan10 at videolan.org> | Thu Apr  4 16:35:44 2013 +0200| [885e17483ae7e8577b27e19b5703c16432d70feb] | committer: Erwan Tulou

skins: don't create a video control if no size provided

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=885e17483ae7e8577b27e19b5703c16432d70feb
---

 modules/gui/skins2/parser/builder.cpp |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/modules/gui/skins2/parser/builder.cpp b/modules/gui/skins2/parser/builder.cpp
index 1de4e20..288afb1 100644
--- a/modules/gui/skins2/parser/builder.cpp
+++ b/modules/gui/skins2/parser/builder.cpp
@@ -1037,6 +1037,13 @@ void Builder::addVideo( const BuilderData::Video &rData )
             Data.m_autoResize = false;
         }
     }
+    if( !(Data.m_width > 0 && Data.m_height > 0) )
+    {
+        msg_Err( getIntf(),
+            "pls, provide a valid size for the video control id: %s "
+             "(dropping the video control)", Data.m_id.c_str() );
+        return;
+    }
 
     // Get the visibility variable
     // XXX check when it is null



More information about the vlc-commits mailing list