mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-20 05:13:30 -07:00
Fix possible crashes. Closes #1814.
This commit is contained in:
parent
bf173d894c
commit
b63915f10a
2 changed files with 4 additions and 1 deletions
|
@ -46,7 +46,6 @@
|
|||
#include <QFile>
|
||||
#include <QUrl>
|
||||
#include <QMenu>
|
||||
#include <QTimer>
|
||||
#include <QFileDialog>
|
||||
#include <libtorrent/version.hpp>
|
||||
|
||||
|
@ -379,6 +378,8 @@ void AddNewTorrentDialog::renameSelectedFile()
|
|||
if (selectedIndexes.size() != 1)
|
||||
return;
|
||||
const QModelIndex &index = selectedIndexes.first();
|
||||
if (!index.isValid())
|
||||
return;
|
||||
// Ask for new name
|
||||
bool ok;
|
||||
const QString new_name_last = AutoExpandableDialog::getText(this, tr("Rename the file"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue