Skip to content
Permalink
Browse files
Merge pull request #6345 from spycrab/qt_fix_fsw
Qt/FileystemWidget: Fix crash when right-clicking GC disc
  • Loading branch information
stenzek committed Feb 2, 2018
2 parents e20eac7 + 8a612bf commit cf5bf38
Showing 1 changed file with 5 additions and 3 deletions.
@@ -148,11 +148,13 @@ void FilesystemWidget::ShowContextMenu(const QPoint&)

QMenu* menu = new QMenu(this);

DiscIO::Partition partition = GetPartitionFromID(item->data(ENTRY_PARTITION).toInt());
QString path = item->data(ENTRY_NAME).toString();

EntryType type = item->data(ENTRY_TYPE).value<EntryType>();

DiscIO::Partition partition = type == EntryType::Disc ?
DiscIO::PARTITION_NONE :
GetPartitionFromID(item->data(ENTRY_PARTITION).toInt());
QString path = item->data(ENTRY_NAME).toString();

if ((type == EntryType::Disc && m_volume->GetPartitions().empty()) ||
type == EntryType::Partition)
{

0 comments on commit cf5bf38

Please sign in to comment.