aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--lib/ephy-state.c10
2 files changed, 13 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 1433a8842..4d48a6a78 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2003-04-29 Marco Pesenti Gritti <marco@it.gnome.org>
+ * lib/ephy-state.c: (ephy_states_save)
+
+ Check if there are states before saving, fix a crash
+ closing the nautilus view.
+
+2003-04-29 Marco Pesenti Gritti <marco@it.gnome.org>
+
* data/art/Makefile.am:
Install epiphany-bookmarks.png also in art dir, we are
diff --git a/lib/ephy-state.c b/lib/ephy-state.c
index 44d85909a..746554562 100644
--- a/lib/ephy-state.c
+++ b/lib/ephy-state.c
@@ -41,7 +41,7 @@ enum
EPHY_NODE_STATE_PROP_POSITION_Y = 7
};
-static EphyNode *states;
+static EphyNode *states = NULL;
static void
ephy_states_load (void)
@@ -83,6 +83,8 @@ ephy_states_save (void)
int i;
char *xml_file;
+ if (states == NULL) return;
+
xml_file = g_build_filename (ephy_dot_dir (),
STATES_FILE,
NULL);
@@ -191,7 +193,7 @@ ephy_state_window_set_position (GtkWidget *window, EphyNode *node)
if ((x >= screen_width) || (y >= screen_height))
{
x = y = WINDOW_POSITION_UNSET;
- }
+ }
/* If the window has a saved position set it, otherwise let the WM do it */
if ((x != WINDOW_POSITION_UNSET) && (y != WINDOW_POSITION_UNSET))
@@ -323,13 +325,13 @@ ephy_state_add_window (GtkWidget *window,
/* Metacity and presumably any other sane wm won't let
* you drag the titlebar of a window off the screen, so
* we set the inital cordinate to an impossible value (-1,-1)
- */
+ */
g_value_init (&value, G_TYPE_INT);
g_value_set_int (&value, WINDOW_POSITION_UNSET);
ephy_node_set_property (node, EPHY_NODE_STATE_PROP_POSITION_X,
&value);
g_value_unset (&value);
-
+
g_value_init (&value, G_TYPE_INT);
g_value_set_int (&value, WINDOW_POSITION_UNSET);
ephy_node_set_property (node, EPHY_NODE_STATE_PROP_POSITION_Y,