[PATCH] core: fix potential segfault in metadata_full_resolution_done_cb()
- From: Guillaume Emont <gemont igalia com>
- To: grilo-list gnome org
- Subject: [PATCH] core: fix potential segfault in metadata_full_resolution_done_cb()
- Date: Thu, 10 Feb 2011 12:29:00 +0100
When introducing the cancel notification patch, it was assumed that the source
passed to metadata_full_resolution_done_cb() is the original media source that
triggered the full resolution. This is generally wrong, and can cause a
segfault. The original source is available in cb_info->source.
---
src/grl-media-source.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/grl-media-source.c b/src/grl-media-source.c
index f3ea5e0..7e6a057 100644
--- a/src/grl-media-source.c
+++ b/src/grl-media-source.c
@@ -1273,7 +1273,7 @@ metadata_full_resolution_done_cb (GrlMetadataSource *source,
if (cb_info->pending_callbacks == 0) {
GError *_error = (GError *)error;
gboolean should_free_error = FALSE;
- if (operation_is_cancelled (GRL_MEDIA_SOURCE (source),
+ if (operation_is_cancelled (cb_info->source,
cb_info->ctl_info->metadata_id)) {
/* if the plugin already set an error, we don't care because we're
* cancelled */
--
1.7.1
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]