Author: post
Date: 2010-10-24 16:56:38 +0200 (Sun, 24 Oct 2010)
New Revision: 3584
Modified:
trunk/src/rs-tethered-shooting.c
Log:
Be sure to release context/ressources when using close button. Also eliminate a
few unneeded checks.
Modified: trunk/src/rs-tethered-shooting.c
===================================================================
--- trunk/src/rs-tethered-shooting.c 2010-10-24 14:44:21 UTC (rev 3583)
+++ trunk/src/rs-tethered-shooting.c 2010-10-24 14:56:38 UTC (rev 3584)
@@ -760,8 +760,7 @@
{
TetherInfo *t = (TetherInfo*)user_data;
shutdown_async_thread(t);
- if (t->camera)
- closeconnection(t);
+ closeconnection(t);
gtk_list_store_clear(t->camera_store);
int i = enumerate_cameras(t->camera_store, t->context);
append_status(t, _("Found %d cameras\n"), i);
@@ -777,8 +776,7 @@
{
TetherInfo *t = (TetherInfo*)user_data;
shutdown_async_thread(t);
- if (t->camera)
- closeconnection(t);
+ closeconnection(t);
GtkTreeIter iter;
if (gtk_combo_box_get_active_iter(t->camera_selector, &iter))
initcamera(t,&iter);
@@ -862,6 +860,9 @@
close_button_pressed(GtkEntry *entry, gpointer user_data)
{
TetherInfo *t = (TetherInfo*)user_data;
+ shutdown_async_thread(t);
+ closeconnection(t);
+ gp_context_unref(t->context);
gtk_widget_destroy(t->window);
}
_______________________________________________
Rawstudio-commit mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-commit