[grilo/0.1.x] test-ui: Do nothing if no element has been selected
- From: Juan A. Suarez Romero <jasuarez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo/0.1.x] test-ui: Do nothing if no element has been selected
- Date: Tue, 3 Apr 2012 15:54:34 +0000 (UTC)
commit 80b1781c5b057455e761e2633f8ae52dad35a29e
Author: Juan A. Suarez Romero <jasuarez igalia com>
Date: Tue Apr 3 12:32:16 2012 +0000
test-ui: Do nothing if no element has been selected
tools/grilo-test-ui/main.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/tools/grilo-test-ui/main.c b/tools/grilo-test-ui/main.c
index 45be3ba..e965a95 100644
--- a/tools/grilo-test-ui/main.c
+++ b/tools/grilo-test-ui/main.c
@@ -831,12 +831,15 @@ static void
browser_row_selected_cb (GtkTreeView *tree_view,
gpointer user_data)
{
- GtkTreePath *path;
+ GtkTreePath *path = NULL;
GtkTreeIter iter;
GrlMediaSource *source;
GrlMedia *content;
gtk_tree_view_get_cursor (tree_view, &path, NULL);
+ if (!path) {
+ return;
+ }
gtk_tree_model_get_iter (view->browser_model, &iter, path);
gtk_tree_model_get (view->browser_model,
&iter,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]