Skip to content

Commit

Permalink
WiX4: Issue #1464: Installer crashes when using custom UIs with Features
Browse files Browse the repository at this point in the history
  • Loading branch information
oleg-shilo committed Mar 2, 2024
1 parent b16209c commit 3943a68
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Source/src/WixSharp.UI/ManagedUI/Forms/FeatureItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,14 @@ public FeatureItem(Session session, string name)
// Get default install level and feature condition (if any).
//
if (!int.TryParse(session["INSTALLLEVEL"], out var installLevel)) installLevel = 1; // MSI default
var condition = session.OpenView("select * from Condition where Feature_ = '" + name + "'");
Dictionary<string, object> conditionRow = condition.FirstOrDefault();

Dictionary<string, object> conditionRow = null;

if (session.Database.IsTablePersistent("Condition"))
{
var condition = session.OpenView("select * from Condition where Feature_ = '" + name + "'");
conditionRow = condition.FirstOrDefault();
}

var data = session.OpenView("select * from Feature where Feature = '" + name + "'");
Dictionary<string, object> row = data.FirstOrDefault();
Expand Down

0 comments on commit 3943a68

Please sign in to comment.