[totem] main: Don't save session if video widget failed



commit de1019fc04bf60d9225943464722fcb6754c0bdc
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Mar 13 14:14:24 2013 +0100

    main: Don't save session if video widget failed
    
    If the video widget couldn't be instantiated, don't try to
    save the session.

 src/totem-session.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/totem-session.c b/src/totem-session.c
index 91bc127..e5c16d2 100644
--- a/src/totem-session.c
+++ b/src/totem-session.c
@@ -97,6 +97,9 @@ totem_session_save (Totem *totem)
        GFile *file;
        gint64 curr;
 
+       if (totem->bvw == NULL)
+               return;
+
        file = get_session_file ();
        curr = bacon_video_widget_get_current_time (totem->bvw);
        totem_playlist_save_session_playlist (totem->playlist, file, curr);


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