[grilo] 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] test-ui: Do nothing if no element has been selected
- Date: Tue, 3 Apr 2012 15:54:44 +0000 (UTC)
commit 7ab229ff98adfab77252b1826952da5769842481
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 0e95aaf..b3808ce 100644
--- a/tools/grilo-test-ui/main.c
+++ b/tools/grilo-test-ui/main.c
@@ -859,12 +859,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]