Codebase list gnome-maps / 3dd850c
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. Marcus Lundblad 1 year, 7 months ago
1 changed file(s) with 2 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
469469 FillTileData *data = g_task_get_task_data (task);
470470 char *contents;
471471 gsize length;
472 GBytes *bytes;
473472
474473 g_file_load_contents_finish (data->file, res, &contents, &length, NULL, NULL);
475474
476475 if (contents != NULL)
477476 {
478 bytes = g_bytes_new_take (contents, length);
477 data->bytes = g_bytes_new_take (contents, length);
479478 g_signal_emit_by_name (data->self, "received-data", data->x, data->y, data->z, data->bytes);
480 g_task_return_pointer (task, g_steal_pointer (&bytes), (GDestroyNotify)g_bytes_unref);
479 g_task_return_pointer (task, g_steal_pointer (&data->bytes), (GDestroyNotify)g_bytes_unref);
481480 }
482481 }
483482