[gedit] Fix runtime warning in last patch
- From: Paolo Borelli <pborelli src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gedit] Fix runtime warning in last patch
- Date: Sat, 1 Aug 2009 11:57:10 +0000 (UTC)
commit 53760d0ae606ec02692287cfc55e39ab43f8e111
Author: Paolo Borelli <porelli gnome org>
Date: Sat Aug 1 13:57:01 2009 +0200
Fix runtime warning in last patch
plugins/changecase/gedit-changecase-plugin.c | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
---
diff --git a/plugins/changecase/gedit-changecase-plugin.c b/plugins/changecase/gedit-changecase-plugin.c
index 29fc072..8544aeb 100644
--- a/plugins/changecase/gedit-changecase-plugin.c
+++ b/plugins/changecase/gedit-changecase-plugin.c
@@ -283,18 +283,21 @@ update_ui_real (GeditWindow *window,
WindowData *data)
{
GtkTextView *view;
- GtkTextBuffer *buffer;
- gboolean sensitive;
GtkAction *action;
+ gboolean sensitive = FALSE;
gedit_debug (DEBUG_PLUGINS);
view = GTK_TEXT_VIEW (gedit_window_get_active_view (window));
- buffer = gtk_text_view_get_buffer (view);
- sensitive = ((view != NULL) &&
- gtk_text_view_get_editable (view) &&
- gtk_text_buffer_get_has_selection (buffer));
+ if (view != NULL)
+ {
+ GtkTextBuffer *buffer;
+
+ buffer = gtk_text_view_get_buffer (view);
+ sensitive = (gtk_text_view_get_editable (view) &&
+ gtk_text_buffer_get_has_selection (buffer));
+ }
action = gtk_action_group_get_action (data->action_group,
"ChangeCase");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]