Skip to content

Commit

Permalink
[fix] missing deallocator from the progress dialog.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jim Carroll committed Oct 21, 2012
1 parent 22a3fed commit 2289464
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
12 changes: 11 additions & 1 deletion xbmc/interfaces/legacy/Dialog.cpp
Expand Up @@ -230,8 +230,18 @@ namespace XBMCAddon
return value;
}

DialogProgress::~DialogProgress() {}
DialogProgress::~DialogProgress() { TRACE; deallocating(); }

void DialogProgress::deallocating()
{
TRACE;

if (dlg)
{
DelayedCallGuard dg;
dlg->Close();
}
}

void DialogProgress::create(const String& heading, const String& line1,
const String& line2,
Expand Down
5 changes: 4 additions & 1 deletion xbmc/interfaces/legacy/Dialog.h
Expand Up @@ -224,9 +224,12 @@ namespace XBMCAddon
{
CGUIDialogProgress* dlg;

protected:
virtual void deallocating();

public:

DialogProgress() : AddonClass("DialogProgress") {}
DialogProgress() : AddonClass("DialogProgress"), dlg(NULL) {}
virtual ~DialogProgress();


Expand Down

0 comments on commit 2289464

Please sign in to comment.