[aravis] viewer: avoid warning if a camera is not found
- From: Emmanuel Pacaud <emmanuel src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [aravis] viewer: avoid warning if a camera is not found
- Date: Thu, 5 Jun 2014 08:02:14 +0000 (UTC)
commit 9b4385fe3ae42029a4a9b2abb0c62ddce5274918
Author: Emmanuel Pacaud <emmanuel gnome org>
Date: Wed Jun 4 17:55:40 2014 +0200
viewer: avoid warning if a camera is not found
Partial fix, as any click on the camera control will also emit a warning.
The complete fix involves a constantl monitoring of the devices, and the
update of the camera combo box.
viewer/arvviewer.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/viewer/arvviewer.c b/viewer/arvviewer.c
index 89840df..72560d8 100644
--- a/viewer/arvviewer.c
+++ b/viewer/arvviewer.c
@@ -540,6 +540,8 @@ arv_viewer_select_camera_cb (GtkComboBox *combo_box, ArvViewer *viewer)
gtk_tree_model_get (GTK_TREE_MODEL (list_store), &iter, 0, &camera_id, -1);
viewer->camera = arv_camera_new (camera_id);
g_free (camera_id);
+ if (viewer->camera == NULL)
+ return;
viewer->rotation = 0;
viewer->stream = arv_camera_create_stream (viewer->camera, NULL, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]