mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-24 14:24:54 +00:00
DiscIO: Check if m_Disc is null in ParsePartitionData()
This commit is contained in:
parent
b5fe028e18
commit
caa2f15105
1 changed files with 7 additions and 1 deletions
|
@ -265,8 +265,14 @@ bool ParsePartitionData(SPartition& _rPartition)
|
|||
|
||||
// Ready some stuff
|
||||
m_Disc = CreateVolumeFromFilename(m_Filename, _rPartition.GroupNumber, _rPartition.Number);
|
||||
std::unique_ptr<IFileSystem> filesystem(CreateFileSystem(m_Disc));
|
||||
if (m_Disc == nullptr)
|
||||
{
|
||||
ERROR_LOG(DISCIO, "Failed to create volume from file %s", m_Filename.c_str());
|
||||
m_Disc = OldVolume;
|
||||
return false;
|
||||
}
|
||||
|
||||
std::unique_ptr<IFileSystem> filesystem(CreateFileSystem(m_Disc));
|
||||
if (!filesystem)
|
||||
{
|
||||
ERROR_LOG(DISCIO, "Failed to create filesystem for group %d partition %u", _rPartition.GroupNumber, _rPartition.Number);
|
||||
|
|
Loading…
Add table
Reference in a new issue