summaryrefslogtreecommitdiff
path: root/src/video_out/video_out_directx.c
diff options
context:
space:
mode:
authorMichael Roitzsch <mroi@users.sourceforge.net>2003-10-31 17:25:20 +0000
committerMichael Roitzsch <mroi@users.sourceforge.net>2003-10-31 17:25:20 +0000
commit68fb5107a56d7efcf82a7c8015fbc0f39434f056 (patch)
treea922d23615b9624900107d5943b0b123b073553d /src/video_out/video_out_directx.c
parent1fbd6d1d81d24259a20ce2bcd77687bd69e8e7fd (diff)
downloadxine-lib-68fb5107a56d7efcf82a7c8015fbc0f39434f056.tar.gz
xine-lib-68fb5107a56d7efcf82a7c8015fbc0f39434f056.tar.bz2
First check the pointers on NULL values, then memset;
patch provided by Chris Rankin CVS patchset: 5650 CVS date: 2003/10/31 17:25:20
Diffstat (limited to 'src/video_out/video_out_directx.c')
-rwxr-xr-xsrc/video_out/video_out_directx.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/video_out/video_out_directx.c b/src/video_out/video_out_directx.c
index 9f0798c6c..8016e3a08 100755
--- a/src/video_out/video_out_directx.c
+++ b/src/video_out/video_out_directx.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2000-2001 the xine project
+ * Copyright (C) 2000-2003 the xine project
*
* This file is part of xine, a unix video player.
*
@@ -20,7 +20,7 @@
* video_out_directx.c, direct draw video output plugin for xine
* by Matthew Grooms <elon@altavista.com>
*
- * $Id: video_out_directx.c,v 1.8 2003/10/23 15:17:07 mroi Exp $
+ * $Id: video_out_directx.c,v 1.9 2003/10/31 17:25:20 mroi Exp $
*/
typedef unsigned char boolean;
@@ -853,6 +853,10 @@ static vo_frame_t * win32_alloc_frame( vo_driver_t * vo_driver )
win32_frame_t * win32_frame;
win32_frame = ( win32_frame_t * ) malloc( sizeof( win32_frame_t ) );
+ if (win32_frame == NULL) {
+ printf("win32_alloc_frame: out of memory\n");
+ return NULL;
+ }
memset( win32_frame, 0, sizeof( win32_frame_t ) );
win32_frame->vo_frame.proc_slice = NULL;