From 4d9d391e8392c6084d93dede0f55ea2aa4431ed2 Mon Sep 17 00:00:00 2001
From: Murai Takashi <tmurai01@gmail.com>
Date: Thu, 18 Jul 2013 19:35:43 +0900
Subject: [PATCH] Fix forming reference to null pointer
---
.../cortex/Persistence/Wrappers/MediaFormatIO.cpp | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/apps/cortex/Persistence/Wrappers/MediaFormatIO.cpp b/src/apps/cortex/Persistence/Wrappers/MediaFormatIO.cpp
index 9d613db..cdfe79d 100644
a
|
b
|
void MediaFormatIO::xmlImportChild(
|
1301 | 1301 | if(m_format.type == B_MEDIA_ENCODED_AUDIO) { |
1302 | 1302 | if(!childAsFormat || childAsFormat->m_format.type != B_MEDIA_RAW_AUDIO) |
1303 | 1303 | context.reportError("Expected a raw_audio_format."); |
1304 | | m_format.u.encoded_audio.output = childAsFormat->m_format.u.raw_audio; |
| 1304 | |
| 1305 | if(childAsFormat) |
| 1306 | m_format.u.encoded_audio.output = |
| 1307 | childAsFormat->m_format.u.raw_audio; |
1305 | 1308 | } |
1306 | 1309 | else if(m_format.type == B_MEDIA_ENCODED_VIDEO) { |
1307 | 1310 | if(!childAsFormat || childAsFormat->m_format.type != B_MEDIA_RAW_VIDEO) |
1308 | 1311 | context.reportError("Expected a raw_video_format."); |
1309 | | m_format.u.encoded_video.output = childAsFormat->m_format.u.raw_video; |
| 1312 | |
| 1313 | if(childAsFormat) |
| 1314 | m_format.u.encoded_video.output = |
| 1315 | childAsFormat->m_format.u.raw_video; |
1310 | 1316 | } |
1311 | 1317 | else { |
1312 | 1318 | // +++++ should this be an error? |