Skip to content

Commit f96a2e2

Browse files
author
runrevali
committed
[[ RefactorSyntax ]] Check deploy params for emptiness rather than nullity
1 parent ba26d8d commit f96a2e2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

engine/src/deploy_windows.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1693,16 +1693,16 @@ Exec_stat MCDeployToWindows(const MCDeployParameters& p_params)
16931693

16941694
// If we are setting both app and doc icons, clear out the existing
16951695
// icon resources
1696-
if (t_success && p_params . app_icon != NULL && p_params . doc_icon != NULL)
1696+
if (t_success && !MCStringIsEmpty(p_params . app_icon) && !MCStringIsEmpty(p_params . doc_icon))
16971697
MCWindowsResourcesClearIcons(t_resources);
16981698

1699-
if (t_success && p_params . app_icon != NULL)
1699+
if (t_success && !MCStringIsEmpty(p_params . app_icon))
17001700
{
17011701
t_success = MCWindowsResourcesAddIcon(t_resources, p_params . app_icon, 111, 0x0409);
17021702
if (!t_success)
17031703
t_success = MCDeployThrow(kMCDeployErrorWindowsBadAppIcon);
17041704
}
1705-
if (t_success && p_params . doc_icon != NULL)
1705+
if (t_success && !MCStringIsEmpty(p_params . doc_icon))
17061706
{
17071707
t_success = MCWindowsResourcesAddIcon(t_resources, p_params . doc_icon, 112, 0x0409);
17081708
if (!t_success)
@@ -1711,11 +1711,11 @@ Exec_stat MCDeployToWindows(const MCDeployParameters& p_params)
17111711

17121712
// If there is a version info array, then build a VERSIONINFO resource and
17131713
// add it.
1714-
if (t_success && p_params . version_info != NULL)
1714+
if (t_success && !MCArrayIsEmpty(p_params . version_info))
17151715
t_success = MCWindowsResourcesAddVersionInfo(t_resources, p_params . version_info);
17161716

17171717
// Add the manifest to the resources
1718-
if (t_success && p_params . manifest != NULL)
1718+
if (t_success && !MCStringIsEmpty(p_params . manifest))
17191719
t_success = MCWindowsResourcesAddManifest(t_resources, p_params . manifest);
17201720

17211721
// Now we have the various references we need and have prepared the

0 commit comments

Comments
 (0)