From 40ece7af4b3d6e2a5d4278ccd209c5ffddd8a053 Mon Sep 17 00:00:00 2001 From: Laszlo Papp Date: Wed, 7 Dec 2011 18:03:35 +0200 Subject: Add the real NULL check against the memory allocation result for proper handling --- src/decoders/qalflacaudiodecoder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/decoders/qalflacaudiodecoder.cpp b/src/decoders/qalflacaudiodecoder.cpp index d6873ea..2f282b6 100644 --- a/src/decoders/qalflacaudiodecoder.cpp +++ b/src/decoders/qalflacaudiodecoder.cpp @@ -133,7 +133,7 @@ QALFlacAudioDecoder::open(const QString &fileName) d->file.setFileName(fileName); d->flacStreamDecoder = *FLAC__stream_decoder_new(); - if (d->flacStreamDecoder) { + if (d->flacStreamDecoder == 0) { qWarning() << Q_FUNC_INFO << "Could not allocate enough memory for the flac stream decoder handle"; return false; } -- cgit v1.2.3