[svn r631] Added missing gmyth_query_disconnect () call into gmyth_epg_disconnect()
1.1 --- a/gmyth/src/gmyth_epg.c Thu May 03 15:55:19 2007 +0100
1.2 +++ b/gmyth/src/gmyth_epg.c Thu May 03 16:05:04 2007 +0100
1.3 @@ -136,6 +136,7 @@
1.4 g_return_val_if_fail (gmyth_epg != NULL, FALSE);
1.5
1.6 if (gmyth_epg->sqlquery != NULL) {
1.7 + gmyth_query_disconnect (gmyth_epg);
1.8 g_object_unref (gmyth_epg->sqlquery);
1.9 gmyth_epg->sqlquery = NULL;
1.10 }
2.1 --- a/gmyth/src/gmyth_query.c Thu May 03 15:55:19 2007 +0100
2.2 +++ b/gmyth/src/gmyth_query.c Thu May 03 16:05:04 2007 +0100
2.3 @@ -75,6 +75,10 @@
2.4 {
2.5 GMythQuery *gmyth_query = GMYTH_QUERY (object);
2.6
2.7 + if (gmyth_query->conn != NULL) {
2.8 + gmyth_query_disconnect (gmyth_query);
2.9 + }
2.10 +
2.11 if (gmyth_query->backend_info) {
2.12 g_object_unref (gmyth_query->backend_info);
2.13 gmyth_query->backend_info = NULL;
2.14 @@ -176,7 +180,8 @@
2.15 gboolean
2.16 gmyth_query_disconnect (GMythQuery *gmyth_query)
2.17 {
2.18 - assert(gmyth_query);
2.19 + g_return_val_if_fail (gmyth_query != NULL, FALSE);
2.20 + g_return_val_if_fail (gmyth_query->conn != NULL, FALSE);
2.21
2.22 /* TODO: Check how to return error */
2.23 gmyth_debug ("[%s] Closing gmyth_query->conn", __FUNCTION__);