[vlc-devel] commit: libvlc_video_set_viewport: Make sure we don't crash if view is NULL . (Pierre d'Herbemont )
git version control
git at videolan.org
Fri Jun 13 15:19:48 CEST 2008
vlc | branch: master | Pierre d'Herbemont <pdherbemont at videolan.org> | Fri Jun 13 15:14:38 2008 +0200| [e315c9b416dd33922deb3700dd192bad1cfff872]
libvlc_video_set_viewport: Make sure we don't crash if view is NULL.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e315c9b416dd33922deb3700dd192bad1cfff872
---
src/control/video.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/control/video.c b/src/control/video.c
index 4978333..02c97ed 100644
--- a/src/control/video.c
+++ b/src/control/video.c
@@ -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 */
More information about the vlc-devel
mailing list