Commit 4446bab1 authored by Vladimir Malenovsky's avatar Vladimir Malenovsky Committed by emerit
Browse files

fix if() condition, prevent crash when CPE is NULL

parent a201bd74
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -222,8 +222,9 @@ ivas_error pre_proc_front_ivas(
    }

#ifdef DEBUG_MODE_INFO
    if ( !( hCPE->hStereoTD != NULL && n > 0 ) )
    if ( !( hCPE != NULL && hCPE->hStereoTD != NULL && n > 0 ) )
    {
        /* for TD stereo only write out first channel. The existence of a second channel can vary, this is just easier to handle */
        int16_t tmp_dmx_in[L_FRAME48k];
        mvr2s( signal_in - NS2SA( st->input_Fs, ACELP_LOOK_NS ), tmp_dmx_in, input_frame );
        dbgwrite( tmp_dmx_in, sizeof( int16_t ), input_frame, 1, strcat( fname( debug_dir, "ivas_input_dmx", 0, n + 1, ENC ), ".pcm" ) );