1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-22 20:44:15 +00:00

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() { void torrentAdditionDialog::saveSettings() {
QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent")); 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; QStringList contentColsWidths;
// -1 because we hid PROGRESS column // -1 because we hid PROGRESS column
for(int i=0; i<PropListModel->columnCount()-1; ++i) { for(int i=0; i<PropListModel->columnCount()-1; ++i) {