[gnome-maps/wip/mlundblad/fix-local-tiles: 1/3] file-data-source: Read content bytes into the correct object
- From: Marcus Lundblad <mlundblad src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps/wip/mlundblad/fix-local-tiles: 1/3] file-data-source: Read content bytes into the correct object
- Date: Tue, 13 Sep 2022 21:18:08 +0000 (UTC)
commit 71b0a6bd4946f386104f2a1f8b74b036ba2eecdd
Author: Marcus Lundblad <ml dfupdate se>
Date: Tue Sep 13 23:08:33 2022 +0200
file-data-source: Read content bytes into the correct object
Store the file byte contents into the task data structure.
The bytes were actually stored in a local bytes object,
resulting in null being passed to the renderer.
lib/maps-file-data-source.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/lib/maps-file-data-source.c b/lib/maps-file-data-source.c
index 2e326f58..2e4c7270 100644
--- a/lib/maps-file-data-source.c
+++ b/lib/maps-file-data-source.c
@@ -470,13 +470,12 @@ on_file_load (GObject *source_object,
FillTileData *data = g_task_get_task_data (task);
char *contents;
gsize length;
- GBytes *bytes;
g_file_load_contents_finish (data->file, res, &contents, &length, NULL, NULL);
if (contents != NULL)
{
- bytes = g_bytes_new_take (contents, length);
+ data->bytes = g_bytes_new_take (contents, length);
g_signal_emit_by_name (data->self, "received-data", data->x, data->y, data->z, data->bytes);
g_task_return_pointer (task, g_steal_pointer (&bytes), (GDestroyNotify)g_bytes_unref);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]