[PATCH] widl: Add null source pointer check for typelib writer.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=38964 Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> --- All other locations already test for it. tools/widl/write_msft.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/widl/write_msft.c b/tools/widl/write_msft.c index aa05dcfe567..440bb23f79b 100644 --- a/tools/widl/write_msft.c +++ b/tools/widl/write_msft.c @@ -2560,7 +2560,8 @@ static void set_lib_flags(msft_typelib_t *typelib) static void ctl2_write_segment(msft_typelib_t *typelib, int segment) { - put_data(typelib->typelib_segment_data[segment], typelib->typelib_segdir[segment].length); + if (typelib->typelib_segment_data[segment]) + put_data(typelib->typelib_segment_data[segment], typelib->typelib_segdir[segment].length); } static void ctl2_finalize_typeinfos(msft_typelib_t *typelib, int filesize) -- 2.28.0
participants (1)
-
Nikolay Sivov