fix a bug where fx browser crashes when insert if no item is selected

This commit is contained in:
pojienie 2020-04-19 11:45:31 +00:00
parent 1cc6716cff
commit c99df6a18c

View file

@ -494,8 +494,9 @@ TFx *InsertFxPopup::createFx() {
TXsheet *xsh = scene->getXsheet(); TXsheet *xsh = scene->getXsheet();
QTreeWidgetItem *item = m_fxTree->currentItem(); QTreeWidgetItem *item = m_fxTree->currentItem();
QString text = item->data(0, Qt::UserRole).toString(); if (item == NULL) return 0;
QString text = item->data(0, Qt::UserRole).toString();
if (text.isEmpty()) return 0; if (text.isEmpty()) return 0;
TFx *fx; TFx *fx;