Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
pizzaboxer committed Jun 27, 2024
2 parents 997b3c9 + bf412cd commit 9e311e6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Bloxstrap/UI/ViewModels/Menu/AppearanceViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ private void BrowseCustomIconLocation()
{
var dialog = new OpenFileDialog
{
Filter = $"{Resources.Strings.Menu_IconFiles}|*.ico|{Resources.Strings.Menu_AllFiles}|*.*"
Filter = $"{Resources.Strings.Menu_IconFiles}|*.ico"
};

if (dialog.ShowDialog() != true)
Expand Down
2 changes: 1 addition & 1 deletion Bloxstrap/UI/ViewModels/Menu/ModsViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ private void ManageCustomFont()

string type = dialog.FileName.Substring(dialog.FileName.Length-3, 3).ToLowerInvariant();

if (!File.ReadAllBytes(dialog.FileName).Take(4).SequenceEqual(FontHeaders[type]))
if (!FontHeaders.ContainsKey(type) || !File.ReadAllBytes(dialog.FileName).Take(4).SequenceEqual(FontHeaders[type]))
{
Frontend.ShowMessageBox(Resources.Strings.Menu_Mods_Misc_CustomFont_Invalid, MessageBoxImage.Error);
return;
Expand Down

0 comments on commit 9e311e6

Please sign in to comment.