Skip to content

Commit

Permalink
Avoid error when missing saved settings
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkMpn committed Aug 31, 2023
1 parent b3a3246 commit 67d2405
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,6 @@
<None Include="Key.snk" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\AutocompleteMenu\AutocompleteMenu-ScintillaNET.csproj">
<Project>{43cbc9aa-6a8e-463f-83a9-aff3124afdb6}</Project>
<Name>AutocompleteMenu-ScintillaNET</Name>
</ProjectReference>
<ProjectReference Include="..\MarkMpn.Sql4Cds.Engine.NetFx\MarkMpn.Sql4Cds.Engine.NetFx.csproj">
<Project>{23288bb2-0d6f-4329-9a5c-4c659567a652}</Project>
<Name>MarkMpn.Sql4Cds.Engine.NetFx</Name>
Expand Down
4 changes: 2 additions & 2 deletions MarkMpn.Sql4Cds.XTB/PluginControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ private void PluginControl_Load(object sender, EventArgs e)
if (name == _properties.GetType().FullName)
return _properties;

if (!Settings.Instance.RememberSession)
if (!Settings.Instance.RememberSession || Settings.Instance.Session == null)
return null;

IDocumentWindow query = null;
Expand Down Expand Up @@ -197,7 +197,7 @@ private void PluginControl_Load(object sender, EventArgs e)
_objectExplorer.Show(dockPanel, DockState.DockLeft);
_properties.Show(dockPanel, DockState.DockRightAutoHide);

if (Settings.Instance.RememberSession)
if (Settings.Instance.RememberSession && Settings.Instance.Session != null)
{
foreach (var tab in Settings.Instance.Session)
{
Expand Down

0 comments on commit 67d2405

Please sign in to comment.