[Aptitude-svn-commit] r4401 - in branches/aptitude-0.3/aptitude: .
src/vscreen
Daniel Burrows
dburrows at costa.debian.org
Sat Oct 1 01:57:05 UTC 2005
Author: dburrows
Date: Sat Oct 1 01:57:02 2005
New Revision: 4401
Modified:
branches/aptitude-0.3/aptitude/ChangeLog
branches/aptitude-0.3/aptitude/src/vscreen/vscreen_widget.cc
Log:
Allow destroy() to be called multiple times but ignore it after the first call.
Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog (original)
+++ branches/aptitude-0.3/aptitude/ChangeLog Sat Oct 1 01:57:02 2005
@@ -1,5 +1,12 @@
2005-09-30 Daniel Burrows <dburrows at debian.org>
+ * src/vscreen/vscreen_widget.cc:
+
+ Allow destroy() to be called multiple times but ignore it after
+ the first call. This allows download widgets to destroy
+ themselves immediately upon being cancelled, even though the
+ download process will also issue a destroy command on its own.
+
* src/ui.cc, src/ui_download_manager.cc, src/ui_download_manager.h:
Fix more compile problems.
Modified: branches/aptitude-0.3/aptitude/src/vscreen/vscreen_widget.cc
==============================================================================
--- branches/aptitude-0.3/aptitude/src/vscreen/vscreen_widget.cc (original)
+++ branches/aptitude-0.3/aptitude/src/vscreen/vscreen_widget.cc Sat Oct 1 01:57:02 2005
@@ -125,7 +125,9 @@
void vscreen_widget::destroy()
{
assert(refcount > 0);
- assert(!is_destroyed);
+
+ if(is_destroyed)
+ return;
// Make sure we don't die during the destroy routine.
vs_widget_ref this_ref = this;
More information about the Aptitude-svn-commit
mailing list