[vlc-devel] [PATCH 2/4] subpicture private data condition
Yuval Tze
yuvaltze at gmail.com
Thu Mar 24 23:22:50 CET 2011
check that the private data is not null before accessing it.
---
src/misc/subpicture.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/misc/subpicture.c b/src/misc/subpicture.c
index 3e84a27..a1ee386 100644
--- a/src/misc/subpicture.c
+++ b/src/misc/subpicture.c
@@ -152,11 +152,11 @@ void subpicture_Update( subpicture_t *p_subpicture,
if( !p_upd->pf_validate )
return;
if( !p_upd->pf_validate( p_subpicture,
- !video_format_IsSimilar( p_fmt_src,
- &p_private->src ), p_fmt_src,
- !video_format_IsSimilar( p_fmt_dst,
- &p_private->dst ), p_fmt_dst,
- i_ts ) )
+ p_private ? !video_format_IsSimilar( p_fmt_src, &p_private->src ) : false,
+ p_fmt_src,
+ p_private ? !video_format_IsSimilar( p_fmt_dst, &p_private->dst ) : false,
+ p_fmt_dst,
+ i_ts ) )
return;
subpicture_region_ChainDelete( p_subpicture->p_region );
--
1.7.1
More information about the vlc-devel
mailing list