SoundFile.cpp: do a NULL check before deferencing.
CID 296.
This commit is contained in:
@@ -360,6 +360,10 @@ BSoundFile::_ref_to_file(const entry_ref *ref)
|
||||
if (mf.type == B_MEDIA_RAW_AUDIO) {
|
||||
raw = &mf.u.raw_audio;
|
||||
}
|
||||
|
||||
if (raw == NULL)
|
||||
return B_ERROR;
|
||||
|
||||
fSamplingRate = (int)raw->frame_rate;
|
||||
fChannelCount = raw->channel_count;
|
||||
fSampleSize = raw->format & 0xf;
|
||||
|
||||
Reference in New Issue
Block a user