diff options
author | Sam Spilsbury <smspillaz@gmail.com> | 2010-11-05 14:38:40 +0800 |
---|---|---|
committer | Sam Spilsbury <smspillaz@gmail.com> | 2010-11-05 14:38:40 +0800 |
commit | ff64b76a4a37c2ad8e2e5e35f836c2d2c1211c2b (patch) | |
tree | 8d46886b20f68cc4941263035f627b2517d5d4bd | |
parent | 0e33fc2392ce4289b87ac0c43af37a559fa5957f (diff) | |
download | group-ff64b76a4a37c2ad8e2e5e35f836c2d2c1211c2b.tar.gz group-ff64b76a4a37c2ad8e2e5e35f836c2d2c1211c2b.tar.bz2 |
Fix bug where compiz would eat all the system memory (since stl hates negative numbers)
-rw-r--r-- | src/selection.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/selection.cpp b/src/selection.cpp index 4ad1f17..227ed3d 100644 --- a/src/selection.cpp +++ b/src/selection.cpp @@ -165,11 +165,11 @@ Selection::deselect (GroupSelection *group) /* unselect group */ CompWindowList copy = (CompWindowList) *this; CompWindowList::iterator it = begin (); + unsigned int num = MAX (0, size () - group->mWindows.size ()); /* Faster than doing groupDeleteSelectionWindow for each window in this group. */ - resize (size () - - group->mWindows.size ()); + resize (num); foreach (CompWindow *cw, copy) { |