Check if torrent_info is initialized in torrent addition dialog destructor (safer)

This commit is contained in:
Christophe Dumez 2010-06-23 17:58:32 +00:00
parent 0b70b857b9
commit b7de3fcebd

View file

@ -92,7 +92,7 @@ void torrentAdditionDialog::readSettings() {
void torrentAdditionDialog::saveSettings() {
QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent"));
if(!is_magnet && t->num_files() > 1) {
if(!is_magnet && t.get() && t->is_valid() && t->num_files() > 1) {
QStringList contentColsWidths;
// -1 because we hid PROGRESS column
for(int i=0; i<PropListModel->columnCount()-1; ++i) {