Merge lp:~ted/hud/lp1242339 into lp:hud/13.10

Proposed by Ted Gould
Status: Merged
Approved by: Pete Woods
Approved revision: 343
Merged at revision: 341
Proposed branch: lp:~ted/hud/lp1242339
Merge into: lp:hud/13.10
Diff against target: 18 lines (+6/-1)
1 file modified
window-stack-bridge/BamfWindowStack.cpp (+6/-1)
To merge this branch: bzr merge lp:~ted/hud/lp1242339
Reviewer Review Type Date Requested Status
Pete Woods (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+192231@code.launchpad.net

Commit message

Don't crash if we get asked about a window we don't know about, return a null list.

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
Pete Woods (pete-woods) :
review: Approve

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-11 11:18:33 +0000
3+++ window-stack-bridge/BamfWindowStack.cpp 2013-10-22 19:57:33 +0000
4@@ -194,8 +194,13 @@
5 QStringList BamfWindowStack::GetWindowProperties(uint windowId,
6 const QString &appId, const QStringList &names) {
7 QStringList result;
8+ auto window = m_windowsById[windowId];
9+
10+ if (window == nullptr)
11+ return result;
12+
13 for (const QString &name : names) {
14- result << m_windowsById[windowId]->xProp(name);
15+ result << window->xProp(name);
16 }
17 return result;
18 }

Subscribers

People subscribed via source and target branches