From 76d16f61efbd847479d28b86c81192c4c1e191ca Mon Sep 17 00:00:00 2001 From: csoler Date: Thu, 6 Sep 2018 22:14:17 +0200 Subject: [PATCH] fixed crash when no item to unban is actually selected in Banned files list --- retroshare-gui/src/gui/FileTransfer/BannedFilesDialog.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/retroshare-gui/src/gui/FileTransfer/BannedFilesDialog.cpp b/retroshare-gui/src/gui/FileTransfer/BannedFilesDialog.cpp index 5be060b09..ccaa456f1 100644 --- a/retroshare-gui/src/gui/FileTransfer/BannedFilesDialog.cpp +++ b/retroshare-gui/src/gui/FileTransfer/BannedFilesDialog.cpp @@ -48,6 +48,9 @@ void BannedFilesDialog::unbanFile() QTableWidgetItem *item = ui.bannedFiles_TW->item(row, COLUMN_FILE_HASH); + if(!item) + return ; + RsFileHash hash(item->data(Qt::UserRole).toString().toStdString()) ; rsFiles->unbanFile(hash) ;