aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xbmc/utils/ProgressJob.cpp14
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