mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Added null check to two dimensional array
This commit is contained in:
parent
d1049aaefe
commit
4cd200df98
@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@ -291,14 +292,15 @@ namespace Wabbajack.Lib
|
||||
{
|
||||
try
|
||||
{
|
||||
IniData data;
|
||||
var parser = new FileIniDataParser(new IniDataParser(config));
|
||||
data = parser.ReadFile(file);
|
||||
var data = parser.ReadFile(file);
|
||||
if (data.Sections["Display"] == null)
|
||||
return;
|
||||
|
||||
if (data.Sections["Display"]["iSize W"] != null && data.Sections["Display"]["iSize H"] != null)
|
||||
{
|
||||
data.Sections["Display"]["iSize W"] = SystemParameters.PrimaryScreenWidth.ToString();
|
||||
data.Sections["Display"]["iSize H"] = SystemParameters.PrimaryScreenHeight.ToString();
|
||||
data.Sections["Display"]["iSize W"] = SystemParameters.PrimaryScreenWidth.ToString(CultureInfo.CurrentCulture);
|
||||
data.Sections["Display"]["iSize H"] = SystemParameters.PrimaryScreenHeight.ToString(CultureInfo.CurrentCulture);
|
||||
}
|
||||
|
||||
parser.WriteFile(file, data);
|
||||
@ -308,7 +310,6 @@ namespace Wabbajack.Lib
|
||||
Utils.Log($"Skipping screen size remap for {file} due to parse error.");
|
||||
continue;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user