Skip to content

Commit

Permalink
Fixed|DocumentWidget: Wait for background tasks to stop in destructor
Browse files Browse the repository at this point in the history
The widget cannot be destroyed until the background tasks are finished
(if any are running at time of destruction).
  • Loading branch information
skyjake committed Aug 5, 2013
1 parent df044de commit ef382f7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions doomsday/client/src/ui/widgets/documentwidget.cpp
Expand Up @@ -106,6 +106,12 @@ public Font::RichFormat::IStyle
self.add(progress);
}

~Instance()
{
// Wait until background tasks finish.
tasks.waitForDone();
}

bool isBeingWrapped() const
{
return !tasks.isDone();
Expand Down

0 comments on commit ef382f7

Please sign in to comment.