projects
/
flashlight-appl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c4e676b
)
Try to close camera device if opening of enabling of flashlight failed
author
Roman Moravcik
<roman.moravcik@gmail.com>
Thu, 7 Jan 2010 13:25:06 +0000
(14:25 +0100)
committer
Roman Moravcik
<roman.moravcik@gmail.com>
Thu, 7 Jan 2010 13:25:06 +0000
(14:25 +0100)
src/flashlight_applet.c
patch
|
blob
|
history
diff --git
a/src/flashlight_applet.c
b/src/flashlight_applet.c
index
464bd4b
..
6dbb596
100644
(file)
--- a/
src/flashlight_applet.c
+++ b/
src/flashlight_applet.c
@@
-84,12
+84,14
@@
flashlight_status_plugin_enable (FlashlightPlugin *plugin,
if (flashlight_open (priv->flashlight, "/dev/video0") < 0) {
flashlight_status_plugin_show_notification (plugin,
_("Unable to initialize flashlight.\nCamera in use by another application."));
+ flashlight_close (priv->flashlight);
return;
}
if (flashlight_set_intensity (priv->flashlight, 1) < 0) {
flashlight_status_plugin_show_notification (plugin,
_("Unable to turn on flashlight."));
+ flashlight_close (priv->flashlight);
return;
}