Browse Source

Fix possible crashes. Closes #1814.

adaptive-webui-19844
sledgehammer999 10 years ago
parent
commit
08e14cdc26
  1. 3
      src/addnewtorrentdialog.cpp
  2. 2
      src/properties/propertieswidget.cpp

3
src/addnewtorrentdialog.cpp

@ -46,7 +46,6 @@ @@ -46,7 +46,6 @@
#include <QFile>
#include <QUrl>
#include <QMenu>
#include <QTimer>
#include <QFileDialog>
#include <libtorrent/version.hpp>
@ -378,6 +377,8 @@ void AddNewTorrentDialog::renameSelectedFile() @@ -378,6 +377,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"),

2
src/properties/propertieswidget.cpp

@ -536,6 +536,8 @@ void PropertiesWidget::renameSelectedFile() { @@ -536,6 +536,8 @@ void PropertiesWidget::renameSelectedFile() {
if (selectedIndexes.size() != 1)
return;
const QModelIndex index = selectedIndexes.first();
if (!index.isValid())
return;
// Ask for new name
bool ok;
QString new_name_last = AutoExpandableDialog::getText(this, tr("Rename the file"),

Loading…
Cancel
Save