[cheese/camerabin2-format: 4/27] Avoid overwriting errors in CheeseCamera
- From: Oleksij Rempel <orempel src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cheese/camerabin2-format: 4/27] Avoid overwriting errors in CheeseCamera
- Date: Sat, 24 Mar 2012 08:28:57 +0000 (UTC)
commit 9b40d8a6b8e69876f38833a2d52d1bfe1bf2f20b
Author: David King <amigadave amigadave com>
Date: Mon Mar 12 19:38:23 2012 +0000
Avoid overwriting errors in CheeseCamera
As pointed out by Bastien Nocera in bug 671902, CheeseCamera overwrites
GError pointers. Avoid this by setting the error and returning
immediately afterwards.
libcheese/cheese-camera.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/libcheese/cheese-camera.c b/libcheese/cheese-camera.c
index 0488813..8e6d8fc 100644
--- a/libcheese/cheese-camera.c
+++ b/libcheese/cheese-camera.c
@@ -427,7 +427,7 @@ cheese_camera_set_error_element_not_found (GError **error, const gchar *factoryn
{
g_return_if_fail (error == NULL || *error == NULL);
- g_set_error (error, CHEESE_CAMERA_ERROR, CHEESE_CAMERA_ERROR_ELEMENT_NOT_FOUND, "%s%s.", _("One or more needed GStreamer elements are missing: "), factoryname);
+ g_set_error (error, CHEESE_CAMERA_ERROR, CHEESE_CAMERA_ERROR_ELEMENT_NOT_FOUND, "%s.", factoryname);
}
/*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]