summaryrefslogtreecommitdiff
path: root/mg2d.c
diff options
context:
space:
mode:
Diffstat (limited to 'mg2d.c')
-rw-r--r--mg2d.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/mg2d.c b/mg2d.c
index c9070fb..b1c7fb7 100644
--- a/mg2d.c
+++ b/mg2d.c
@@ -772,6 +772,9 @@ void mg2d_print_stats(MG2DContext *ctx, const char *prefix)
MG2DLevel *level = priv->root;
int64_t other, levels_total = 0;
+ if (!level)
+ return;
+
if (!prefix)
prefix = "";