[vlmc-devel] commit: YouTubeUploader: Avoid assert failure, handle error... ( Rohit Yadav )

git at videolan.org git at videolan.org
Tue Nov 16 16:46:46 CET 2010


vlmc | branch: master | Rohit Yadav <rohityadav89 at gmail.com> | Tue Nov 16 21:33:04 2010 +0530| [27934ab6f26311662f7661f004f439f05d1ac058] | committer: Rohit Yadav 

YouTubeUploader: Avoid assert failure, handle error...

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

 src/Services/YouTube/YouTubeUploader.cpp |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/Services/YouTube/YouTubeUploader.cpp b/src/Services/YouTube/YouTubeUploader.cpp
index 34c657a..260c508 100644
--- a/src/Services/YouTube/YouTubeUploader.cpp
+++ b/src/Services/YouTube/YouTubeUploader.cpp
@@ -143,8 +143,11 @@ YouTubeUploader::uploadFinished()
     parser.read();
 
     /* Checks VideoID parsed by the parser */
-    Q_ASSERT( parser.getVideoId() != "" );
-    QString videoUrl = VIDEO_URL + parser.getVideoId();
+    QString videoUrl;
+    if ( parser.getVideoId() != "" )
+        videoUrl = VIDEO_URL + parser.getVideoId();
+    else
+        videoUrl = ""; /* Some error may've occured at YouTube */
 
     emit uploadOver( QString( videoUrl ) );
 



More information about the Vlmc-devel mailing list