diff options
author | Pär Björklund <per.bjorklund@gmail.com> | 2015-07-28 15:54:33 +0200 |
---|---|---|
committer | Pär Björklund <per.bjorklund@gmail.com> | 2015-07-28 15:54:33 +0200 |
commit | 342ecde0a311fc2d6c30000873cf55ebeffa5ccc (patch) | |
tree | cd81437814741a92c8782b6fe9b704f73cb6c0c9 | |
parent | fb75f4c093ae1fcb019b79692f8d00a5e159ad5e (diff) | |
parent | 658b0a21ed4a7443d6670fc6180d8dc2e9b2ca47 (diff) |
Merge pull request #7634 from Paxxi/filemanager
[xbmc][filemanager] Fixes a crash when trying do delete a file in filemanager
-rw-r--r-- | xbmc/utils/ProgressJob.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/xbmc/utils/ProgressJob.cpp b/xbmc/utils/ProgressJob.cpp index 990474325a..045566a86a 100644 --- a/xbmc/utils/ProgressJob.cpp +++ b/xbmc/utils/ProgressJob.cpp @@ -180,10 +180,20 @@ void CProgressJob::MarkFinished() if (m_progress != NULL) { if (m_updateProgress) + { m_progress->MarkFinished(); + //We don't own this pointer and it will be deleted after it's marked finished + //just set it to nullptr so we don't try to use it again + m_progress = nullptr; + } } else if (m_progressDialog != NULL && m_autoClose) + { m_progressDialog->Close(); + //We don't own this pointer and it will be deleted after it's marked finished + //just set it to nullptr so we don't try to use it again + m_progressDialog = nullptr; + } } bool CProgressJob::IsCancelled() const |