# HG changeset patch # User melunko # Date 1178204704 -3600 # Node ID 7427cb5b2469abdd0d4c06e657f79ea7314c3419 # Parent f41dd580496b8ed805e159f10e9797c7182ac717 [svn r631] Added missing gmyth_query_disconnect () call into gmyth_epg_disconnect() diff -r f41dd580496b -r 7427cb5b2469 gmyth/src/gmyth_epg.c --- a/gmyth/src/gmyth_epg.c Thu May 03 15:55:19 2007 +0100 +++ b/gmyth/src/gmyth_epg.c Thu May 03 16:05:04 2007 +0100 @@ -136,6 +136,7 @@ g_return_val_if_fail (gmyth_epg != NULL, FALSE); if (gmyth_epg->sqlquery != NULL) { + gmyth_query_disconnect (gmyth_epg); g_object_unref (gmyth_epg->sqlquery); gmyth_epg->sqlquery = NULL; } diff -r f41dd580496b -r 7427cb5b2469 gmyth/src/gmyth_query.c --- a/gmyth/src/gmyth_query.c Thu May 03 15:55:19 2007 +0100 +++ b/gmyth/src/gmyth_query.c Thu May 03 16:05:04 2007 +0100 @@ -75,6 +75,10 @@ { GMythQuery *gmyth_query = GMYTH_QUERY (object); + if (gmyth_query->conn != NULL) { + gmyth_query_disconnect (gmyth_query); + } + if (gmyth_query->backend_info) { g_object_unref (gmyth_query->backend_info); gmyth_query->backend_info = NULL; @@ -176,7 +180,8 @@ gboolean gmyth_query_disconnect (GMythQuery *gmyth_query) { - assert(gmyth_query); + g_return_val_if_fail (gmyth_query != NULL, FALSE); + g_return_val_if_fail (gmyth_query->conn != NULL, FALSE); /* TODO: Check how to return error */ gmyth_debug ("[%s] Closing gmyth_query->conn", __FUNCTION__);