[gnote] Fix crash when disabling note actions
- From: Aurimas Černius <aurimasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnote] Fix crash when disabling note actions
- Date: Sun, 11 Jan 2015 17:59:52 +0000 (UTC)
commit 121b74a2e49a181527a651e31a43250b84441d88
Author: Aurimas Černius <aurisc4 gmail com>
Date: Sun Jan 11 19:56:24 2015 +0200
Fix crash when disabling note actions
Occurrs when synchronizing or when setting note to read only.
Fixes Bug 742657.
src/notewindow.cpp | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/notewindow.cpp b/src/notewindow.cpp
index 7847289..d1242a3 100644
--- a/src/notewindow.cpp
+++ b/src/notewindow.cpp
@@ -617,7 +617,8 @@ namespace gnote {
if(m_global_keys)
m_global_keys->enabled(m_enabled);
FOREACH(const Glib::RefPtr<Gtk::Action> & action, get_widget_actions()) {
- if(Glib::RefPtr<NonModifyingNoteAction>::cast_dynamic(action) == 0) {
+ // A list includes empty actions to mark separators, non-modifying actions are always enabled
+ if(action != 0 && Glib::RefPtr<NonModifyingNoteAction>::cast_dynamic(action) == 0) {
action->set_sensitive(enable);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]