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
=== modified file 'src/Unity/scope.cpp'
--- src/Unity/scope.cpp 2015-02-03 11:15:21 +0000
+++ src/Unity/scope.cpp 2015-02-04 04:53:06 +0000
@@ -851,7 +851,10 @@
851851
852unity::shell::scopes::SettingsModelInterface* Scope::settings() const852unity::shell::scopes::SettingsModelInterface* Scope::settings() const
853{853{
854 m_settingsModel->update_child_scopes(m_scopesInstance->getAllMetadata());854 if (m_settingsModel && m_scopesInstance)
855 {
856 m_settingsModel->update_child_scopes(m_scopesInstance->getAllMetadata());
857 }
855 return m_settingsModel.data();858 return m_settingsModel.data();
856}859}
857860

Subscribers

People subscribed via source and target branches

to all changes: