[grilo] core: fix potential segfault in metadata_full_resolution_done_cb()
- From: Iago Toral Quiroga <itoral src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo] core: fix potential segfault in metadata_full_resolution_done_cb()
- Date: Thu, 10 Feb 2011 11:46:23 +0000 (UTC)
commit 9b10a74236f3b0343686efd4934e37b8720eb039
Author: Guillaume Emont <gemont igalia com>
Date: Thu Feb 10 12:29:00 2011 +0100
core: fix potential segfault in metadata_full_resolution_done_cb()
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.
Signed-off-by: Iago Toral Quiroga <itoral igalia com>
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 */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]