From c3e46d5b454738e96d2d62ed783573fe701b5c0b Mon Sep 17 00:00:00 2001 From: LPFaint99 Date: Sun, 21 Aug 2011 18:33:21 -0700 Subject: [PATCH] partial fix for issue 4742 --- .../Core/Src/IPC_HLE/WII_IPC_HLE_Device_DI.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_DI.cpp b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_DI.cpp index c02ada362f..126f3daeb4 100644 --- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_DI.cpp +++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_DI.cpp @@ -211,7 +211,9 @@ u32 CWII_IPC_HLE_Device_di::ExecuteCommand(u32 _BufferIn, u32 _BufferInSize, u32 // Don't do anything if the log is unselected if (LogManager::GetInstance()->IsEnabled(LogTypes::FILEMON)) { - const char *pFilename = m_pFileSystem->GetFileName(DVDAddress); + const char *pFilename = NULL; + if (m_pFileSystem) + pFilename = m_pFileSystem->GetFileName(DVDAddress); if (pFilename != NULL) { INFO_LOG(WII_IPC_DVD, "DVDLowRead: %s (0x%llx) - (DVDAddr: 0x%llx, Size: 0x%x)", @@ -233,7 +235,7 @@ u32 CWII_IPC_HLE_Device_di::ExecuteCommand(u32 _BufferIn, u32 _BufferInSize, u32 if (!VolumeHandler::ReadToPtr(Memory::GetPointer(_BufferOut), DVDAddress, Size)) { - PanicAlertT("Cant read from DVD_Plugin - DVD-Interface: Fatal Error"); + PanicAlertT("DVDLowRead - Fatal Error: failed to read from volume"); } } break; @@ -325,10 +327,9 @@ u32 CWII_IPC_HLE_Device_di::ExecuteCommand(u32 _BufferIn, u32 _BufferInSize, u32 PanicAlertT("Detected attempt to read more data from the DVD than fit inside the out buffer. Clamp."); Size = _BufferOutSize; } - - if (!VolumeHandler::RAWReadToPtr(Memory::GetPointer(_BufferOut), DVDAddress, Size)) + if(!VolumeHandler::RAWReadToPtr(Memory::GetPointer(_BufferOut), DVDAddress, Size)) { - PanicAlertT("Cant read from DVD_Plugin - DVD-Interface: Fatal Error"); + PanicAlertT("DVDLowUnencryptedRead - Fatal Error: failed to read from volume"); } } break; @@ -348,7 +349,9 @@ u32 CWII_IPC_HLE_Device_di::ExecuteCommand(u32 _BufferIn, u32 _BufferInSize, u32 case DVDLowSeek: { u64 DVDAddress = Memory::Read_U32(_BufferIn + 0x4) << 2; - const char *pFilename = m_pFileSystem->GetFileName(DVDAddress); + const char *pFilename = NULL; + if (m_pFileSystem) + pFilename = m_pFileSystem->GetFileName(DVDAddress); if (pFilename != NULL) { INFO_LOG(WII_IPC_DVD, "DVDLowSeek: %s (0x%llx) - (DVDAddr: 0x%llx)",