X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=retrace%2Fjson.cpp;h=53a61a3a79c3af115d51e89c083564a23bb9a19b;hb=65ba497caca56134f9b4f18658d104ce89092c11;hp=bb901c2e5fbcec1c7833f9e3ae855868a88a49db;hpb=4e0bfee3af9a3cc752d1a62ff8a09a649a7b2357;p=apitrace diff --git a/retrace/json.cpp b/retrace/json.cpp index bb901c2..53a61a3 100644 --- a/retrace/json.cpp +++ b/retrace/json.cpp @@ -304,6 +304,11 @@ JSONWriter::writeBool(bool b) { void JSONWriter::writeImage(image::Image *image, const char *format, unsigned depth) { + if (!image) { + writeNull(); + return; + } + beginObject(); // Tell the GUI this is no ordinary object, but an image