Merge lp:~marcustomlinson/unity-scopes-shell/settings_crash_fix into lp:unity-scopes-shell

Proposed by Marcus Tomlinson
Status: Merged
Approved by: Michi Henning
Approved revision: 193
Merged at revision: 193
Proposed branch: lp:~marcustomlinson/unity-scopes-shell/settings_crash_fix
Merge into: lp:unity-scopes-shell
Diff against target: 14 lines (+4/-1)
1 file modified
src/Unity/scope.cpp (+4/-1)
To merge this branch: bzr merge lp:~marcustomlinson/unity-scopes-shell/settings_crash_fix
Reviewer Review Type Date Requested Status
Michi Henning (community) Approve
Review via email: mp+248476@code.launchpad.net

Commit message

Check validity of m_settingsModel and m_scopesInstance pointers before dereferencing them in Scope::settings()

To post a comment you must log in.
Revision history for this message
Michi Henning (michihenning) wrote :

Looks good!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/Unity/scope.cpp'
2--- src/Unity/scope.cpp 2015-02-03 11:15:21 +0000
3+++ src/Unity/scope.cpp 2015-02-04 04:53:06 +0000
4@@ -851,7 +851,10 @@
5
6 unity::shell::scopes::SettingsModelInterface* Scope::settings() const
7 {
8- m_settingsModel->update_child_scopes(m_scopesInstance->getAllMetadata());
9+ if (m_settingsModel && m_scopesInstance)
10+ {
11+ m_settingsModel->update_child_scopes(m_scopesInstance->getAllMetadata());
12+ }
13 return m_settingsModel.data();
14 }
15

Subscribers

People subscribed via source and target branches

to all changes: