summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2011-02-23 01:54:12 +0000
committerBastien Nocera <hadess@hadess.net>2011-02-23 01:54:12 +0000
commit24c309fec02d0dd46f45b0780c8c08d4d5745b8e (patch)
treeab961e0b3d1cd9f15fd4aa4582602a94ea6a06c0 /src
parent111c7d7a9539ed904c535634c56ac5f79debfed3 (diff)
save-file: Fix possible assertion
Turns out that we're not certain of receiving a "file-closed" for every file that's replaced. Launch Totem on a local file, with an already running instance, with a local file already opened.
Diffstat (limited to 'src')
-rw-r--r--src/plugins/save-file/totem-save-file.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/plugins/save-file/totem-save-file.c b/src/plugins/save-file/totem-save-file.c
index 638d8c13..2c5b68fa 100644
--- a/src/plugins/save-file/totem-save-file.c
+++ b/src/plugins/save-file/totem-save-file.c
@@ -213,7 +213,12 @@ totem_save_file_file_opened (TotemObject *totem,
TotemSaveFilePluginPrivate *priv = pi->priv;
GtkAction *action;
- g_assert (pi->priv->mrl == NULL);
+ if (pi->priv->mrl != NULL) {
+ g_free (pi->priv->mrl);
+ pi->priv->mrl = NULL;
+ g_free (pi->priv->name);
+ pi->priv->name = NULL;
+ }
if (mrl == NULL)
return;