Minor custom action optimization
Rob Mensching committed
Feb 27, 2021 at 07:49 UTC
f217241ff291dc53abefe3ba551d16b120d5a7aa
1 file changed
+10
-10
src/ca/wixdepca.cpp
+10
-10
@@ -278,6 +278,16 @@ static HRESULT EnsureAbsentDependents(
278
UINT cDependents = 0;
279
PMSIHANDLE hDependencyRec = NULL;
280
281
+ // Skip the dependent check if the WixDependencyProvider table is missing (no dependency providers).
282
+ hr = WcaTableExists(L"WixDependencyProvider");
283
+ if (S_FALSE == hr)
284
+ {
285
+ WcaLog(LOGMSG_STANDARD, "Skipping the dependents check since no dependency providers are authored.");
286
+ ExitFunction1(hr = S_OK);
287
+ }
288
+
289
+ ExitOnFailure(hr, "Failed to check if the WixDependencyProvider table exists.");
290
+
291
// Split the IGNOREDEPENDENCIES property for use below if set. If it is "ALL", then quit now.
292
hr = SplitIgnoredDependents(&sdIgnoredDependents);
293
ExitOnFailure(hr, "Failed to get the ignored dependents.");
@@ -297,16 +307,6 @@ static HRESULT EnsureAbsentDependents(
307
hr = S_OK;
308
}
309
300
- // Skip the dependent check if the WixDependencyProvider table is missing (no dependency providers).
301
- hr = WcaTableExists(L"WixDependencyProvider");
302
- if (S_FALSE == hr)
303
- {
304
- WcaLog(LOGMSG_STANDARD, "Skipping the dependents check since no dependency providers are authored.");
305
- ExitFunction();
306
- }
307
-
308
- ExitOnFailure(hr, "Failed to check if the WixDependencyProvider table exists.");
309
-
310
// Set the registry hive to use depending on install context.
311
hkHive = fMachineContext ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER;
312