diff options
author | Anton Khirnov <anton@khirnov.net> | 2019-04-07 09:58:36 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2019-04-07 09:58:36 +0200 |
commit | 9c47c8202644e20e6ae054a6c7ddf09b6a0e4808 (patch) | |
tree | 3fdca5bfab11bb4292515a3a1c43d3688cda86d5 | |
parent | 2e03749bb901494f857547cc518ad58eea76a098 (diff) |
mg2d: do not crash if print_stats() is called before any solves
-rw-r--r-- | mg2d.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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 = ""; |