Skip to content

Commit d0b2cce

Browse files
committed
[CI 16822] engine: deploy: Do nothing in add_version_info_entry if no context specified.
1 parent ef9fd5e commit d0b2cce

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

engine/src/deploy_windows.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1092,6 +1092,10 @@ static uint64_t MCWindowsVersionInfoParseVersion(MCStringRef p_string)
10921092

10931093
static bool add_version_info_entry(void *p_context, MCArrayRef p_array, MCNameRef p_key, MCValueRef p_value)
10941094
{
1095+
// If there is no context, then we have nothing to add the entry to.
1096+
if (p_context == nil)
1097+
return true;
1098+
10951099
MCWindowsVersionInfo *t_string;
10961100
MCExecContext ctxt(nil, nil, nil);
10971101
MCAutoStringRef t_value;
@@ -1111,7 +1115,8 @@ static bool add_version_info_entry(void *p_context, MCArrayRef p_array, MCNameRe
11111115
t_bytes[t_byte_count - 2] = '\0';
11121116
t_bytes[t_byte_count - 1] = '\0';
11131117
}
1114-
return MCWindowsVersionInfoAdd((MCWindowsVersionInfo *)p_context, MCNameGetCString(p_key), true, t_bytes, t_byte_count, t_string);
1118+
1119+
return MCWindowsVersionInfoAdd((MCWindowsVersionInfo *)p_context, MCNameGetCString(p_key), true, t_bytes, t_byte_count, t_string);
11151120
}
11161121

11171122
static bool MCWindowsResourcesAddVersionInfo(MCWindowsResources& self, MCArrayRef p_info)

0 commit comments

Comments
 (0)