Skip to content

Commit

Permalink
fixed bug when program tries to overwrite text in dialog when dialog …
Browse files Browse the repository at this point in the history
…is not created
  • Loading branch information
TomasMahdal committed Aug 8, 2021
1 parent 9e7ee4d commit 1b68277
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions AMP4SCS/AMP4SCS.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<UseWindowsForms>true</UseWindowsForms>
<AssemblyName>AdvancedModPackerforSCSGames</AssemblyName>
<RootNamespace>AdvancedETS2Packer</RootNamespace>
<Version>1.0.2</Version>
</PropertyGroup>

<ItemGroup>
Expand Down
10 changes: 6 additions & 4 deletions AMP4SCS/PackingDialog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,12 @@ public PackingDialog()
/// <param name="status">Status string, that will be displayed on form.</param>
public void UpdateStatus(string status)
{
Invoke((MethodInvoker)delegate
{
lblStatus.Text = LocRM.GetString(status);
});
if (this.IsHandleCreated) {
Invoke((MethodInvoker)delegate
{
lblStatus.Text = LocRM.GetString(status);
});
}
}
}
}

0 comments on commit 1b68277

Please sign in to comment.