mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-10 16:19:28 +01:00
RegisterWidget: Fix crash when right-clicking when there is no selected cell
This commit is contained in:
parent
a12b9ba6d5
commit
bf68211878
@ -114,11 +114,11 @@ void RegisterWidget::ShowContextMenu()
|
|||||||
{
|
{
|
||||||
QMenu* menu = new QMenu(this);
|
QMenu* menu = new QMenu(this);
|
||||||
|
|
||||||
auto variant = m_table->currentItem()->data(DATA_TYPE);
|
auto* raw_item = m_table->currentItem();
|
||||||
|
|
||||||
if (!variant.isNull())
|
if (raw_item != nullptr && !raw_item->data(DATA_TYPE).isNull())
|
||||||
{
|
{
|
||||||
auto* item = static_cast<RegisterColumn*>(m_table->currentItem());
|
auto* item = static_cast<RegisterColumn*>(raw_item);
|
||||||
auto type = static_cast<RegisterType>(item->data(DATA_TYPE).toInt());
|
auto type = static_cast<RegisterType>(item->data(DATA_TYPE).toInt());
|
||||||
auto display = item->GetDisplay();
|
auto display = item->GetDisplay();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user