rhythmbox r6209 - in trunk: . sources
- From: jmatthew svn gnome org
- To: svn-commits-list gnome org
- Subject: rhythmbox r6209 - in trunk: . sources
- Date: Fri, 13 Mar 2009 10:38:27 +0000 (UTC)
Author: jmatthew
Date: Fri Mar 13 10:38:27 2009
New Revision: 6209
URL: http://svn.gnome.org/viewvc/rhythmbox?rev=6209&view=rev
Log:
2009-03-13 Jonathan Matthew <jonathan d14n org>
* sources/rb-auto-playlist-source.c:
(rb_auto_playlist_source_do_query):
We can only do subset queries if the existing query model is not the
cached 'all' query model. Fixes crashes when trying to search in auto
playlists.
Modified:
trunk/ChangeLog
trunk/sources/rb-auto-playlist-source.c
Modified: trunk/sources/rb-auto-playlist-source.c
==============================================================================
--- trunk/sources/rb-auto-playlist-source.c (original)
+++ trunk/sources/rb-auto-playlist-source.c Fri Mar 13 10:38:27 2009
@@ -756,15 +756,17 @@
RHYTHMDB_QUERY_SUBQUERY, priv->search_query,
RHYTHMDB_QUERY_END);
- if (subset) {
+ g_object_get (priv->browser, "input-model", &query_model, NULL);
+
+ if (subset && query_model != priv->cached_all_query) {
/* just apply the new query to the existing query model */
- g_object_get (priv->browser, "input-model", &query_model, NULL);
- g_assert (query_model != priv->cached_all_query);
g_object_set (query_model, "query", query, NULL);
rhythmdb_query_model_reapply_query (query_model, FALSE);
g_object_unref (query_model);
} else {
/* otherwise, we need a new query model */
+ g_object_unref (query_model);
+
query_model = g_object_new (RHYTHMDB_TYPE_QUERY_MODEL,
"db", db,
"limit-type", priv->limit_type,
@@ -781,7 +783,7 @@
rhythmdb_do_full_query_async_parsed (db,
RHYTHMDB_QUERY_RESULTS (query_model),
query);
- g_object_unref (G_OBJECT (query_model));
+ g_object_unref (query_model);
}
rhythmdb_query_free (query);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]