[xiph-commits] r11755 - trunk/speex/src
    jm at svn.xiph.org 
    jm at svn.xiph.org
       
    Tue Aug  8 22:24:58 PDT 2006
    
    
  
Author: jm
Date: 2006-08-08 22:24:56 -0700 (Tue, 08 Aug 2006)
New Revision: 11755
Modified:
   trunk/speex/src/speexdec.c
Log:
It's usually a good idea to check if a pointer if NULL *before* using it!
Modified: trunk/speex/src/speexdec.c
===================================================================
--- trunk/speex/src/speexdec.c	2006-08-08 15:27:22 UTC (rev 11754)
+++ trunk/speex/src/speexdec.c	2006-08-09 05:24:56 UTC (rev 11755)
@@ -628,11 +628,11 @@
             if (packet_count==0)
             {
                st = process_header(&op, enh_enabled, &frame_size, &granule_frame_size, &rate, &nframes, forceMode, &channels, &stereo, &extra_headers, quiet);
+               if (!st)
+                  exit(1);
                speex_decoder_ctl(st, SPEEX_GET_LOOKAHEAD, &lookahead);
                if (!nframes)
                   nframes=1;
-               if (!st)
-                  exit(1);
                fout = out_file_open(outFile, rate, &channels);
 
             } else if (packet_count==1)
    
    
More information about the commits
mailing list