From 3fd668e525691800e355177f1ccc026a09aff9bb Mon Sep 17 00:00:00 2001 From: krangelov Date: Thu, 25 Nov 2021 13:51:19 +0100 Subject: [PATCH] fix failure is the printout is empty --- src/runtime/c/pgf/printer.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/runtime/c/pgf/printer.cxx b/src/runtime/c/pgf/printer.cxx index 0c13fa14a..c51f07263 100644 --- a/src/runtime/c/pgf/printer.cxx +++ b/src/runtime/c/pgf/printer.cxx @@ -71,6 +71,10 @@ again: { PgfText *PgfPrinter::get_text() { + if (res == NULL) { + res = (PgfText*) malloc(sizeof(PgfText)); + res->size = 0; + } return res; }