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@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2020-09-23 20:46:22 +03:00 committed by Alexandre Julliard
parent fdf43b9bac
commit fe5bfa5b71
1 changed files with 2 additions and 1 deletions

View File

@ -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)