Nux

Merge lp:~nux-team/nux/lp-1337244 into lp:nux/trusty

Proposed by Stephen M. Webb on 2014-09-30
Status: Merged
Approved by: Marco Trevisan (TreviƱo) on 2014-09-30
Approved revision: 846
Merged at revision: 847
Proposed branch: lp:~nux-team/nux/lp-1337244
Merge into: lp:nux/trusty
Diff against target: 58 lines (+9/-17)
3 files modified
Nux/Area.cpp (+9/-0)
Nux/Layout.cpp (+0/-6)
Nux/View.cpp (+0/-11)
To merge this branch: bzr merge lp:~nux-team/nux/lp-1337244
Reviewer Review Type Date Requested Status
Eleni Maria Stea (community) 2014-09-30 Approve on 2014-09-30
Review via email: mp+236507@code.launchpad.net

Commit message

Area: always make sure we remove and object from layout queue.

Description of the change

Fix crashes due to removed objects remaining in the rendering queue.

Cherry-picked from dev branch for SRU into Ubuntu 14.04.

To post a comment you must log in.
Eleni Maria Stea (hikiko) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Nux/Area.cpp'
2--- Nux/Area.cpp 2013-11-08 04:25:39 +0000
3+++ Nux/Area.cpp 2014-09-30 12:55:23 +0000
4@@ -74,6 +74,15 @@
5
6 Area::~Area()
7 {
8+ // It is possible that the window thread has been deleted before the area
9+ // itself, so check prior to calling RemoveObjectFromLayoutQueue.
10+ WindowThread* wt = GetWindowThread();
11+ if (wt)
12+ {
13+ // It is possible that the object is in the refresh list. Remove it here
14+ // before it is deleted.
15+ wt->RemoveObjectFromLayoutQueue(this);
16+ }
17 ResetDownwardPathToKeyFocusArea();
18 ResetUpwardPathToKeyFocusArea();
19 }
20
21=== modified file 'Nux/Layout.cpp'
22--- Nux/Layout.cpp 2014-02-22 03:50:49 +0000
23+++ Nux/Layout.cpp 2014-09-30 12:55:23 +0000
24@@ -49,12 +49,6 @@
25
26 Layout::~Layout()
27 {
28- // It is possible that this layout object is in the refresh list. Remove
29- // it here before it is deleted.
30- WindowThread* wt = GetWindowThread();
31- if (wt)
32- wt->RemoveObjectFromLayoutQueue(this);
33-
34 std::list<Area *>::iterator it;
35
36 for (it = _layout_element_list.begin(); it != _layout_element_list.end(); it++)
37
38=== modified file 'Nux/View.cpp'
39--- Nux/View.cpp 2013-11-06 14:31:20 +0000
40+++ Nux/View.cpp 2014-09-30 12:55:23 +0000
41@@ -44,17 +44,6 @@
42 backup_texture_.Release();
43 backup_depth_texture_.Release();
44 background_texture_.Release();
45-
46- // It is possible that the window thread has been deleted before the view
47- // itself, so check prior to calling.
48- WindowThread* wt = GetWindowThread();
49-
50- if (wt)
51- {
52- // It is possible that the object is in the refresh list. Remove it here
53- // before it is deleted.
54- wt->RemoveObjectFromLayoutQueue(this);
55- }
56
57 RemoveLayout();
58 }

Subscribers

People subscribed via source and target branches

to all changes: