aboutsummaryrefslogtreecommitdiff
path: root/src/burn/engine/registration.cpp
diff options
context:
space:
mode:
authorSean Hall <r.sean.hall@gmail.com>2021-05-11 17:14:30 -0500
committerSean Hall <r.sean.hall@gmail.com>2021-05-11 19:11:19 -0500
commit1446d4e582465af5c09db3fba16afc59529a3863 (patch)
tree68699ff77b53a9c40370454ff2da237889f4f3fe /src/burn/engine/registration.cpp
parenta91c413750b354ba6975be9d427787b13664b750 (diff)
downloadwix-1446d4e582465af5c09db3fba16afc59529a3863.tar.gz
wix-1446d4e582465af5c09db3fba16afc59529a3863.tar.bz2
wix-1446d4e582465af5c09db3fba16afc59529a3863.zip
Fix StrAllocString assertions.
Diffstat (limited to 'src/burn/engine/registration.cpp')
-rw-r--r--src/burn/engine/registration.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/burn/engine/registration.cpp b/src/burn/engine/registration.cpp
index 19da543c..5b246112 100644
--- a/src/burn/engine/registration.cpp
+++ b/src/burn/engine/registration.cpp
@@ -1137,14 +1137,15 @@ static HRESULT GetBundleManufacturer(
1137 ) 1137 )
1138{ 1138{
1139 HRESULT hr = S_OK; 1139 HRESULT hr = S_OK;
1140 LPCWSTR wzPublisher = pRegistration->sczPublisher ? pRegistration->sczPublisher : L"";
1140 1141
1141 hr = VariableGetString(pVariables, BURN_BUNDLE_MANUFACTURER, psczBundleManufacturer); 1142 hr = VariableGetString(pVariables, BURN_BUNDLE_MANUFACTURER, psczBundleManufacturer);
1142 if (E_NOTFOUND == hr) 1143 if (E_NOTFOUND == hr)
1143 { 1144 {
1144 hr = VariableSetString(pVariables, BURN_BUNDLE_MANUFACTURER, pRegistration->sczPublisher, FALSE, FALSE); 1145 hr = VariableSetString(pVariables, BURN_BUNDLE_MANUFACTURER, wzPublisher, FALSE, FALSE);
1145 ExitOnFailure(hr, "Failed to set bundle manufacturer."); 1146 ExitOnFailure(hr, "Failed to set bundle manufacturer.");
1146 1147
1147 hr = StrAllocString(psczBundleManufacturer, pRegistration->sczPublisher, 0); 1148 hr = StrAllocString(psczBundleManufacturer, wzPublisher, 0);
1148 } 1149 }
1149 ExitOnFailure(hr, "Failed to get bundle manufacturer."); 1150 ExitOnFailure(hr, "Failed to get bundle manufacturer.");
1150 1151
@@ -1159,14 +1160,15 @@ static HRESULT GetBundleName(
1159 ) 1160 )
1160{ 1161{
1161 HRESULT hr = S_OK; 1162 HRESULT hr = S_OK;
1163 LPCWSTR wzDisplayName = pRegistration->sczDisplayName ? pRegistration->sczDisplayName : L"";
1162 1164
1163 hr = VariableGetString(pVariables, BURN_BUNDLE_NAME, psczBundleName); 1165 hr = VariableGetString(pVariables, BURN_BUNDLE_NAME, psczBundleName);
1164 if (E_NOTFOUND == hr) 1166 if (E_NOTFOUND == hr)
1165 { 1167 {
1166 hr = VariableSetString(pVariables, BURN_BUNDLE_NAME, pRegistration->sczDisplayName, FALSE, FALSE); 1168 hr = VariableSetString(pVariables, BURN_BUNDLE_NAME, wzDisplayName, FALSE, FALSE);
1167 ExitOnFailure(hr, "Failed to set bundle name."); 1169 ExitOnFailure(hr, "Failed to set bundle name.");
1168 1170
1169 hr = StrAllocString(psczBundleName, pRegistration->sczDisplayName, 0); 1171 hr = StrAllocString(psczBundleName, wzDisplayName, 0);
1170 } 1172 }
1171 ExitOnFailure(hr, "Failed to get bundle name."); 1173 ExitOnFailure(hr, "Failed to get bundle name.");
1172 1174