From 32823a08550fe19a301160f805cb196039944a73 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Wed, 15 Jan 2020 17:46:01 +0000 Subject: [PATCH] Handle nullptr. --- thirdparty/dxflib_qcad/dl_writer_ascii.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/thirdparty/dxflib_qcad/dl_writer_ascii.cpp b/thirdparty/dxflib_qcad/dl_writer_ascii.cpp index 18463c0ddf..d5452bc862 100644 --- a/thirdparty/dxflib_qcad/dl_writer_ascii.cpp +++ b/thirdparty/dxflib_qcad/dl_writer_ascii.cpp @@ -140,6 +140,9 @@ void DL_WriterA::dxfString( int gc, const char* value ) const #ifndef __GCC2x__ // throw DL_NullStrExc(); #endif + // KIDCAD CHANGE: if we're not going to throw we at least need to + // exit before dereferencing the null value. + return; } m_ofile << ( gc<10 ? " " : (gc<100 ? " " : "") ) << gc << "\n"