From 3f68e015e5de0463e6b6c29507c2cdc8f547c63c Mon Sep 17 00:00:00 2001 From: KitsuneAlex Date: Sat, 11 May 2024 02:06:40 +0200 Subject: [PATCH] Add missing null-check to msdf_shape_orient_contours function --- core/msdfgen-c.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/msdfgen-c.cpp b/core/msdfgen-c.cpp index 708eaba..37bf65a 100644 --- a/core/msdfgen-c.cpp +++ b/core/msdfgen-c.cpp @@ -282,6 +282,9 @@ MSDF_API int msdf_shape_bound_miters(msdf_shape_const_handle shape, } MSDF_API int msdf_shape_orient_contours(msdf_shape_handle shape) { + if(shape == nullptr) { + return MSDF_ERR_INVALID_ARG; + } reinterpret_cast(shape)->orientContours(); return MSDF_SUCCESS; }