Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=38964 Signed-off-by: Nikolay Sivov nsivov@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)