[glade] Fixed compile and runtime warning



commit 68684d2e74b5500053e44bec58895ca0bdf386c0
Author: Juan Pablo Ugarte <juanpablougarte gmail com>
Date:   Thu May 3 16:48:47 2012 -0300

    Fixed compile and runtime warning

 src/glade-window.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/glade-window.c b/src/glade-window.c
index e969b50..4815e5a 100644
--- a/src/glade-window.c
+++ b/src/glade-window.c
@@ -1495,18 +1495,19 @@ on_cut_action_activate (GtkAction *action, GladeWindow *window)
 void
 on_paste_action_activate (GtkAction *action, GladeWindow *window)
 {
+  GtkWidget *placeholder;
   GladeProject *project;
 
   if (!window->priv->active_view)
     return;
 
   project = glade_design_view_get_project (window->priv->active_view);
+  placeholder = glade_util_get_placeholder_from_pointer (GTK_CONTAINER (window));
 
   /* If this action is activated with a key binging (ctrl-v) the widget will be 
    * pasted over the placeholder below the default pointer.
    */
-  glade_project_command_paste (project,
-                               glade_util_get_placeholder_from_pointer (GTK_CONTAINER (window)));
+  glade_project_command_paste (project, placeholder ? GLADE_PLACEHOLDER (placeholder) : NULL);
 }
 
 void



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]