Skip to content

Commit

Permalink
Added check for null image var when loading from file, if null, allo…
Browse files Browse the repository at this point in the history
…cates a small texture first
  • Loading branch information
linuxgurugamer committed Jun 30, 2023
1 parent b2da4a0 commit b5f41d7
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 4 deletions.
3 changes: 3 additions & 0 deletions ChangeLog.txt
@@ -1,5 +1,8 @@
ChangeLog

0.1.9.10 (unreleased)
Added check for null image var when loading from file, if null, allocates a small texture first

0.1.9.9
Release to get AssemblyFileVersion set properly, no functional change

Expand Down
2 changes: 1 addition & 1 deletion GameData/001_ToolbarControl/ToolbarControl.version
Expand Up @@ -10,7 +10,7 @@
"MAJOR": 0,
"MINOR": 1,
"PATCH": 9,
"BUILD": 8
"BUILD": 10
},
"KSP_VERSION": {
"MAJOR": 1,
Expand Down
2 changes: 1 addition & 1 deletion ToolbarControl.version
Expand Up @@ -10,7 +10,7 @@
"MAJOR": 0,
"MINOR": 1,
"PATCH": 9,
"BUILD": 9
"BUILD": 10
},
"KSP_VERSION": {
"MAJOR": 1,
Expand Down
4 changes: 2 additions & 2 deletions ToolbarControl/AssemblyVersion.cs
Expand Up @@ -10,5 +10,5 @@

using System.Reflection;

[assembly: AssemblyVersion("0.1.9.8")]
[assembly: AssemblyFileVersion("0.1.9.8")]
[assembly: AssemblyVersion("0.1.9.10")]
[assembly: AssemblyFileVersion("0.1.9.10")]
4 changes: 4 additions & 0 deletions ToolbarControl/ToolbarControl.cs
Expand Up @@ -612,6 +612,10 @@ public static Boolean LoadImageFromFile(ref Texture2D tex, String fileNamePath)
{

Boolean blnReturn = false;
if (tex == null)
{
tex = new Texture2D(16, 16, TextureFormat.ARGB32, false);
}
bool dds = false;
try
{
Expand Down

0 comments on commit b5f41d7

Please sign in to comment.