diff options
Diffstat (limited to 'pango/serializer.c')
-rw-r--r-- | pango/serializer.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/pango/serializer.c b/pango/serializer.c index a2870362..edd6486f 100644 --- a/pango/serializer.c +++ b/pango/serializer.c @@ -755,6 +755,7 @@ lines_to_json (GtkJsonPrinter *printer, PangoLines *lines) { int width, height; + PangoLine **l; gtk_json_printer_start_object (printer, "output"); @@ -768,12 +769,12 @@ lines_to_json (GtkJsonPrinter *printer, gtk_json_printer_start_array (printer, "lines"); + l = pango_lines_get_lines (lines); for (int i = 0; i < pango_lines_get_line_count (lines); i++) { - PangoLine *line; int x, y; - line = pango_lines_get_line (lines, i, &x, &y); - line_to_json (printer, line, x, y); + pango_lines_get_line_position (lines, i, &x, &y); + line_to_json (printer, l[i], x, y); } gtk_json_printer_end (printer); |