Merge lp:~uriboni/unity-2d/panel-segv-logoff into lp:unity-2d/3.0
Proposed by
Ugo Riboni
Status: | Merged |
---|---|
Approved by: | Florian Boucault |
Approved revision: | 416 |
Merged at revision: | 416 |
Proposed branch: | lp:~uriboni/unity-2d/panel-segv-logoff |
Merge into: | lp:unity-2d/3.0 |
Diff against target: |
53 lines (+12/-7) 2 files modified
libunity-2d-private/src/keyboardmodifiersmonitor.cpp (+11/-6) libunity-2d-private/src/keyboardmodifiersmonitor.h (+1/-1) |
To merge this branch: | bzr merge lp:~uriboni/unity-2d/panel-segv-logoff |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Aurélien Gâteau (community) | Needs Fixing | ||
Florian Boucault | Pending | ||
Review via email:
|
Description of the change
[panel] Fix a bug when exiting the panel cleanly (i.e. on logoff)
To post a comment you must log in.
Sorry but that fix is wrong: it causes the filter to be leaked because it is never deleted.
It does not matter much to the end user but this kind of errors leads to more false positives when hunting for memleaks with valgrind. It also could come back for other X11EventFilters. A better fix would be to delete all filters in Unity2dApplication destructor with:
qDeleteAll( m_x11EventFilte rs);
This should fix the problem because right now the filters are deleted by the QObject destructor of Unity2dApplication. At this point the m_x11EventFilters list does not exist anymore, hence the crash. Deleting filters in Unity2dApplication destructor will ensure filters are deleted *before* the m_x11EventFilters list is deleted.
(Oh, and this could quite easily be unit-tested I think)