aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorConfuSomu2023-06-18 14:37:15 -0400
committerConfuSomu2023-06-18 14:37:15 -0400
commit77d650f4b1dc14964ea5194ef3899f4af6d3f157 (patch)
tree6a4fc5271c29e70af1625e4443f6f3a4ac026a1d /src
parentc4b44abd873016413a2a57c73e69e4afd31628ec (diff)
downloadActorViewer-77d650f4b1dc14964ea5194ef3899f4af6d3f157.tar
ActorViewer-77d650f4b1dc14964ea5194ef3899f4af6d3f157.tar.gz
ActorViewer-77d650f4b1dc14964ea5194ef3899f4af6d3f157.zip
Fix crash when copying status when non is selected
This was an overlooked crash that only happens when done on purpose, as you generally don't press the copy button when nothing is selected.
Diffstat (limited to 'src')
-rw-r--r--src/mainwindow.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 05e8d8a..b9b268c 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -76,7 +76,7 @@ void MainWindow::on_buttonRandom_clicked() {
}
void MainWindow::on_buttonCopy_clicked() {
- if (data_archive == nullptr) return;
+ if (data_archive == nullptr or ui->listWidget->selectedItems().isEmpty()) return;
StatusListItem* item = dynamic_cast<StatusListItem*>(ui->listWidget->selectedItems()[0]);
if (item != nullptr) {