aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ephy-state.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ephy-state.c')
-rw-r--r--lib/ephy-state.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/ephy-state.c b/lib/ephy-state.c
index 90d06883c..1df65a642 100644
--- a/lib/ephy-state.c
+++ b/lib/ephy-state.c
@@ -437,9 +437,12 @@ ephy_state_add_paned (GtkWidget *paned,
void
ephy_state_save (void)
{
- ephy_states_save ();
- ephy_node_unref (states);
- g_object_unref (states_db);
- states = NULL;
- states_db = NULL;
+ if (states)
+ {
+ ephy_states_save ();
+ ephy_node_unref (states);
+ g_object_unref (states_db);
+ states = NULL;
+ states_db = NULL;
+ }
}