diff options
author | Sascha Montellese <sascha.montellese@gmail.com> | 2015-08-01 10:40:12 +0200 |
---|---|---|
committer | Sascha Montellese <sascha.montellese@gmail.com> | 2015-08-01 10:40:12 +0200 |
commit | c5f806e4e027ae1582bbeb412a95df00aa0d9321 (patch) | |
tree | 8f8756b18c3e9b96ac397bd28e94f3f4dbb6ac72 | |
parent | 7137081a9667934f8a8b6b86a27fe8337c5f9b24 (diff) | |
parent | a3ca361265e566e99e1d088efcef6f538f6b58f7 (diff) |
Merge pull request #7680 from Montellese/fix_progressjob16.0a1-Jarvis
CProgressJob: fix crash in DoModal after 658b0a21ed4a7443d6670fc6180d8dc2e9b2ca47
-rw-r--r-- | xbmc/utils/ProgressJob.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/xbmc/utils/ProgressJob.cpp b/xbmc/utils/ProgressJob.cpp index 045566a86a..2d164ac9cc 100644 --- a/xbmc/utils/ProgressJob.cpp +++ b/xbmc/utils/ProgressJob.cpp @@ -82,9 +82,8 @@ bool CProgressJob::DoModal() // do the work bool result = DoWork(); - // close the progress dialog - if (m_autoClose) - m_progressDialog->Close(); + // mark the progress dialog as finished (will close it) + MarkFinished(); m_modal = false; return result; @@ -182,18 +181,13 @@ void CProgressJob::MarkFinished() 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 + // 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 |