[snappy] ui: fix, don't go to next when in last of the list
- From: Luis de Bethencourt <luisbg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [snappy] ui: fix, don't go to next when in last of the list
- Date: Fri, 4 May 2012 10:10:44 +0000 (UTC)
commit a16ce014054c05f386be0a4a1713e0cf6a476fbe
Author: Luis de Bethencourt <luis debethencourt com>
Date: Fri May 4 11:07:44 2012 +0100
ui: fix, don't go to next when in last of the list
src/user_interface.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/src/user_interface.c b/src/user_interface.c
index 6a0ff6a..6382b5b 100644
--- a/src/user_interface.c
+++ b/src/user_interface.c
@@ -1051,11 +1051,13 @@ interface_play_next (UserInterface * ui)
next = g_list_find (ui->uri_list, ui->engine->uri);
next = g_list_next (next);
- next_uri = next->data;
+ if (next != NULL) {
+ next_uri = next->data;
- engine_open_uri (ui->engine, next_uri);
- interface_load_uri (ui, next_uri);
- engine_play (ui->engine);
+ engine_open_uri (ui->engine, next_uri);
+ interface_load_uri (ui, next_uri);
+ engine_play (ui->engine);
+ }
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]