Merge lp:~compiz-team/compiz/compiz.fix_1015151.1 into lp:compiz/0.9.8
Proposed by
Sam Spilsbury
Status: | Merged |
---|---|
Merged at revision: | 3255 |
Proposed branch: | lp:~compiz-team/compiz/compiz.fix_1015151.1 |
Merge into: | lp:compiz/0.9.8 |
Diff against target: |
25 lines (+5/-3) 1 file modified
plugins/wall/src/offset_movement/src/offset-movement.cpp (+5/-3) |
To merge this branch: | bzr merge lp:~compiz-team/compiz/compiz.fix_1015151.1 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Daniel van Vugt | Approve | ||
Review via email: mp+111149@code.launchpad.net |
This proposal supersedes a proposal from 2012-06-20.
Description of the change
== Problem ==
Crash in compiz:
(LP: #1015151)
== Solution ==
Copy the vector, then iterate it.
== Test ==
Covered already, but this wasn't caught by the testsuite as I had to use valgrind to find the memory error. we should run tests under valgrind in CI to catch these ones in future.
To post a comment you must log in.
Diff, since bzr push :parent bugged out and pushed to lp:compiz (reverted in r3252)
=== modified file 'plugins/ wall/src/ offset_ movement/ src/offset- movement. cpp' wall/src/ offset_ movement/ src/offset- movement. cpp 2012-06-19 23:36:57 +0000 wall/src/ offset_ movement/ src/offset- movement. cpp 2012-06-19 23:42:45 +0000 :wall:: movementWindowO nScreen (const CompRect &serverBorderRect, ct));
--- plugins/
+++ plugins/
@@ -28,7 +28,7 @@
compiz:
const CompRegion &screenRegion)
{
- CompRegion sbrRegion (serverBorderRect);
+ CompRegion sbrRegion (static_cast <const CompRect &> (serverBorderRe
/* If the window would be partially offscreen
* after it was moved then we should move it back
@@ -41,10 +41,8 @@
int dx = 0;
int dy = 0;
- CompRect::vector rects (rem.rects ()); ::const_ iterator it = rects.begin (); ::const_ iterator it = rem.rects ().begin ();
-
- for (std::vector <CompRect>
- it != rects.end ();
+ for (std::vector <CompRect>
+ it != rem.rects ().end ();
it++)
{
const CompRect &r = *it;