workaround not reproducible logo drawing crash

This commit is contained in:
stax76
2022-04-02 11:15:04 +02:00
parent f4b4be5466
commit 8ed62df8e2
3 changed files with 32 additions and 22 deletions

View File

@@ -11,6 +11,8 @@
- mpv.net specific commands, the command palette, auto-play property
and various other things are documented in the manual.
- The action used for the right mouse button can be configured.
- Workaround not reproducible logo drawing crash.
- MediaInfo 22.03
5.7.0.0 Stable (2022-03-09)

View File

@@ -1330,9 +1330,11 @@ KP1 script-binding delete_current_file/confirm
public void ShowLogo()
{
if (MainForm.Instance is null)
if (MainForm.Instance == null || App.Settings.LogoCrash)
return;
try
{
bool december = DateTime.Now.Month == 12;
Rectangle cr = MainForm.Instance.ClientRectangle;
@@ -1359,6 +1361,11 @@ KP1 script-binding delete_current_file/confirm
}
}
}
catch (Exception)
{
App.Settings.LogoCrash = true;
}
}
string GetLanguage(string id)
{

View File

@@ -15,6 +15,7 @@ namespace mpvnet
public class AppSettings
{
public bool InputDefaultBindingsFixApplied;
public bool LogoCrash;
public bool ShowMenuFixApplied;
public int Volume = 70;
public List<string> RecentFiles = new List<string>();