Commit 00a9f557 authored by Tristan Van Berkom's avatar Tristan Van Berkom
Browse files

* gladeui/glade-widget.c: Fixed access of NULL project at glade_widget_show/hide time.

parent ae0f5537
......@@ -3,6 +3,8 @@
* gladeui/glade-palette.c: Fixed leaking project (set_project NULL when
palette is disposed fixes it).
* gladeui/glade-widget.c: Fixed access of NULL project at glade_widget_show/hide time.
2011-01-10 Tristan Van Berkom <tristanvb@openismus.com>
* gladeui/glade-signal-model.[ch]:
......
......@@ -2032,9 +2032,10 @@ glade_widget_add_to_layout (GladeWidget * widget, GtkWidget * layout)
void
glade_widget_show (GladeWidget * widget)
{
GladeDesignView *view;
GladeDesignView *view = NULL;
GtkWidget *layout;
GladeProperty *property;
GladeProject *project;
g_return_if_fail (GLADE_IS_WIDGET (widget));
......@@ -2050,8 +2051,9 @@ glade_widget_show (GladeWidget * widget)
return;
}
view =
glade_design_view_get_from_project (glade_widget_get_project (widget));
project = glade_widget_get_project (widget);
if (project)
view = glade_design_view_get_from_project (project);
if (!view)
return;
......@@ -2089,14 +2091,17 @@ void
glade_widget_hide (GladeWidget * widget)
{
g_return_if_fail (GLADE_IS_WIDGET (widget));
if (GTK_IS_WIDGET (widget->priv->object))
{
GladeDesignView *view;
GtkWidget *layout;
GladeProject *project;
GtkWidget *layout;
project = glade_widget_get_project (widget);
if ((view =
glade_design_view_get_from_project (glade_widget_get_project
(widget))) != NULL)
if (project &&
(view = glade_design_view_get_from_project (project)) != NULL)
{
GtkWidget *child;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment