diff options
author | Michael Roitzsch <mroi@users.sourceforge.net> | 2003-10-31 17:25:20 +0000 |
---|---|---|
committer | Michael Roitzsch <mroi@users.sourceforge.net> | 2003-10-31 17:25:20 +0000 |
commit | 68fb5107a56d7efcf82a7c8015fbc0f39434f056 (patch) | |
tree | a922d23615b9624900107d5943b0b123b073553d /src/video_out/video_out_aa.c | |
parent | 1fbd6d1d81d24259a20ce2bcd77687bd69e8e7fd (diff) | |
download | xine-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_aa.c')
-rw-r--r-- | src/video_out/video_out_aa.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/video_out/video_out_aa.c b/src/video_out/video_out_aa.c index 569e8220c..17a947fee 100644 --- a/src/video_out/video_out_aa.c +++ b/src/video_out/video_out_aa.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_out_aa.c,v 1.39 2003/10/23 15:17:07 mroi Exp $ + * $Id: video_out_aa.c,v 1.40 2003/10/31 17:25:20 mroi Exp $ * * video_out_aa.c, ascii-art output plugin for xine * @@ -107,6 +107,10 @@ static vo_frame_t *aa_alloc_frame(vo_driver_t *this) { aa_frame_t *frame; frame = (aa_frame_t *) malloc (sizeof (aa_frame_t)); + if (frame == NULL) { + printf("aa_alloc_frame: out of memory\n"); + return NULL; + } memset (frame, 0, sizeof (aa_frame_t)); frame->vo_frame.proc_slice = NULL; |