diff options
| author | Andrea Azzarone <azzaronea@gmail.com> | 2015-01-15 15:03:13 +0000 |
|---|---|---|
| committer | CI Train Bot <ci-train-bot@canonical.com> | 2015-01-15 15:03:13 +0000 |
| commit | 75d43480ab9e5ca0f9695fbd770f1517cf179c13 (patch) | |
| tree | 6989fd3716b5036939f871b9b35275c1a7dd3335 | |
| parent | 803761c09565bc8c4f66e6f76410e0186dc59089 (diff) | |
| parent | 5d0903aac6d8db2007fb3d044c5faa3749275e8b (diff) | |
Avoid running pontentially dangerous code paths when the screen is locked. Fixes: #1410582
Approved by: Stephen M. Webb (bzr r3908)
| -rw-r--r-- | UnityCore/GnomeSessionManager.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/UnityCore/GnomeSessionManager.cpp b/UnityCore/GnomeSessionManager.cpp index 42a12cea1..c3f50c029 100644 --- a/UnityCore/GnomeSessionManager.cpp +++ b/UnityCore/GnomeSessionManager.cpp @@ -648,6 +648,9 @@ void GnomeManager::Hibernate() bool GnomeManager::CanLock() const { + if (is_locked()) + return true; + glib::Object<GSettings> lockdown_settings(g_settings_new(GNOME_LOCKDOWN_OPTIONS.c_str())); if (g_settings_get_boolean(lockdown_settings, DISABLE_LOCKSCREEN_KEY.c_str()) || |
