Merge pull request #8349 from wrdouglass/2.3
Resolve issue 8347 by checking for nullptr.
This commit is contained in:
@@ -351,6 +351,9 @@ void InputsPanel::expoOpen(QListWidgetItem *item)
|
||||
if (!item)
|
||||
item = ExposlistWidget->currentItem();
|
||||
|
||||
if (item == nullptr)
|
||||
return;
|
||||
|
||||
int idx = item->data(Qt::UserRole).toByteArray().at(0);
|
||||
if (idx < 0) {
|
||||
int ch = -idx - 1;
|
||||
@@ -368,7 +371,11 @@ void InputsPanel::expoOpen(QListWidgetItem *item)
|
||||
|
||||
void InputsPanel::expoAdd()
|
||||
{
|
||||
int index = ExposlistWidget->currentItem()->data(Qt::UserRole).toByteArray().at(0);
|
||||
QListWidgetItem *item = ExposlistWidget->currentItem();
|
||||
if (item == nullptr)
|
||||
return;
|
||||
|
||||
int index = item->data(Qt::UserRole).toByteArray().at(0);
|
||||
|
||||
if (index < 0) { // if empty then return relevant index
|
||||
expoOpen();
|
||||
|
||||
@@ -354,7 +354,11 @@ 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 +375,11 @@ 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