]> git.sesse.net Git - vlc/commitdiff
libvlc_video_set_viewport: Make sure we don't crash if view is NULL.
authorPierre d'Herbemont <pdherbemont@videolan.org>
Fri, 13 Jun 2008 13:14:38 +0000 (15:14 +0200)
committerPierre d'Herbemont <pdherbemont@videolan.org>
Fri, 13 Jun 2008 13:14:38 +0000 (15:14 +0200)
src/control/video.c

index 49783337e62f7f3970bea1b9202759bebe4defec..02c97ed56cf8afdd2c6dc200060b39fbe03e9cd1 100644 (file)
@@ -292,13 +292,14 @@ void libvlc_video_set_viewport( libvlc_instance_t *p_instance,
                             const libvlc_rectangle_t *view, const libvlc_rectangle_t *clip,
                            libvlc_exception_t *p_e )
 {
-    if( NULL == view )
+    if( !view )
     {
         libvlc_exception_raise( p_e, "viewport is NULL" );
+        return;
     }
 
     /* if clip is NULL, then use view rectangle as clip */
-    if( NULL == clip )
+    if( !clip )
         clip = view;
 
     /* set as default for future vout instances */