Merge lp:~indicator-applet-developers/hud/lp-1238338 into lp:hud/13.10

Proposed by Pete Woods
Status: Merged
Approved by: Pete Woods
Approved revision: 335
Merged at revision: 335
Proposed branch: lp:~indicator-applet-developers/hud/lp-1238338
Merge into: lp:hud/13.10
Diff against target: 24 lines (+6/-2)
1 file modified
window-stack-bridge/BamfWindowStack.cpp (+6/-2)
To merge this branch: bzr merge lp:~indicator-applet-developers/hud/lp-1238338
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Thomas Strehl (community) Approve
Review via email: mp+190616@code.launchpad.net

Commit message

Fix crash on window removal

Description of the change

Fix crash on window removal

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Thomas Strehl (strehl-t) :
review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'window-stack-bridge/BamfWindowStack.cpp'
2--- window-stack-bridge/BamfWindowStack.cpp 2013-10-10 16:36:00 +0000
3+++ window-stack-bridge/BamfWindowStack.cpp 2013-10-11 11:19:43 +0000
4@@ -111,7 +111,9 @@
5
6 BamfWindowStack::WindowPtr BamfWindowStack::removeWindow(const QString& path) {
7 WindowPtr window(m_windows.take(path));
8- m_windowsById.remove(window->windowId());
9+ if (!window.isNull()) {
10+ m_windowsById.remove(window->windowId());
11+ }
12 return window;
13 }
14
15@@ -210,7 +212,9 @@
16 void BamfWindowStack::ViewClosed(const QString &path, const QString &type) {
17 if (type == "window") {
18 WindowPtr window(removeWindow(path));
19- WindowDestroyed(window->windowId(), window->applicationId());
20+ if (!window.isNull()) {
21+ WindowDestroyed(window->windowId(), window->applicationId());
22+ }
23 }
24 }
25

Subscribers

People subscribed via source and target branches

to all changes: