[vlmc-devel] commit: Adding a libvlc initialization check. (Hugo Beauzee-Luyssen )

git at videolan.org git at videolan.org
Sun Mar 21 23:00:29 CET 2010


vlmc | branch: master | Hugo Beauzee-Luyssen <beauze.h at gmail.com> | Sun Mar 21 23:00:04 2010 +0100| [8175e8aefa8c83173413d1f6ed5d319f2fffebbc] | committer: Hugo Beauzee-Luyssen 

Adding a libvlc initialization check.

> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=8175e8aefa8c83173413d1f6ed5d319f2fffebbc
---

 src/LibVLCpp/VLCInstance.cpp |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/LibVLCpp/VLCInstance.cpp b/src/LibVLCpp/VLCInstance.cpp
index 8b1b531..ddea119 100644
--- a/src/LibVLCpp/VLCInstance.cpp
+++ b/src/LibVLCpp/VLCInstance.cpp
@@ -42,6 +42,8 @@ Instance::Instance( QObject* parent /*= NULL*/ ) : QObject( parent )
     int argc = sizeof( argv ) / sizeof( *argv );
 
     m_internalPtr = libvlc_new( argc, argv );
+    Q_ASSERT_X( m_internalPtr != NULL, "LibVLCpp::Instance::Instance()",
+                "Can't launch VLMC without a valid LibVLC instance. Please check your VLC installation" );
 }
 
 Instance::~Instance()



More information about the Vlmc-devel mailing list