Resolve issue 8347 by checking if the for nullptr. Additionally resolve a couple other similar issues for keyboard accellerators
This commit is contained in:
@@ -354,7 +354,10 @@ void MixesPanel::mixersDuplicate()
|
||||
|
||||
void MixesPanel::mixerOpen()
|
||||
{
|
||||
int idx = mixersListWidget->currentItem()->data(Qt::UserRole).toByteArray().at(0);
|
||||
QListWidgetItem *item = mixersListWidget->currentItem();
|
||||
if (item == nullptr) return;
|
||||
|
||||
int idx = item->data(Qt::UserRole).toByteArray().at(0);
|
||||
if(idx < 0) {
|
||||
int i = -idx;
|
||||
idx = getMixerIndex(i); //get mixer index to insert
|
||||
@@ -371,7 +374,10 @@ void MixesPanel::mixerOpen()
|
||||
|
||||
void MixesPanel::mixerHighlight()
|
||||
{
|
||||
int idx = mixersListWidget->currentItem()->data(Qt::UserRole).toByteArray().at(0);
|
||||
QListWidgetItem *item = mixersListWidget->currentItem();
|
||||
if (item == nullptr) return;
|
||||
|
||||
int idx = item->data(Qt::UserRole).toByteArray().at(0);
|
||||
int dest;
|
||||
if (idx<0) {
|
||||
dest = -idx;
|
||||
|
||||
Reference in New Issue
Block a user