From 6e5b805dc36448ec9eb83d0b5282026935ffa236 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Mon, 16 Oct 2006 18:16:56 +0000 Subject: [PATCH] - Fixed a crash when displaying properties of a torrent then deleting the torrent --- src/properties_imp.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/properties_imp.cpp b/src/properties_imp.cpp index d46336b62..1c26bfbcc 100644 --- a/src/properties_imp.cpp +++ b/src/properties_imp.cpp @@ -187,10 +187,15 @@ void properties::loadFilteredFiles(){ void properties::updateProgress(){ std::vector fp; - h.file_progress(fp); - torrent_info torrentInfo = h.get_torrent_info(); - for(int i=0; isetData(PropListModel->index(i, PROGRESS), QVariant((double)fp[i])); + try{ + h.file_progress(fp); + torrent_info torrentInfo = h.get_torrent_info(); + for(int i=0; isetData(PropListModel->index(i, PROGRESS), QVariant((double)fp[i])); + } + }catch(invalid_handle e){ + // torrent was removed, closing properties + close(); } }