diff --git a/AssetTools.NET/Extra/TextureDecoders/RGBADecoders.cs b/AssetTools.NET/Extra/TextureDecoders/RGBADecoders.cs index 70f1da0..3869bf2 100644 --- a/AssetTools.NET/Extra/TextureDecoders/RGBADecoders.cs +++ b/AssetTools.NET/Extra/TextureDecoders/RGBADecoders.cs @@ -38,7 +38,7 @@ public static byte[] ReadARGB32(byte[] bytes, int width, int height) for (int i = 0; i < len; i += 4) { t = bytes[i]; - bytes[i] = bytes[i + 1]; + bytes[i] = bytes[i + 3]; bytes[i + 3] = t; t = bytes[i + 1]; bytes[i + 1] = bytes[i + 2]; diff --git a/AssetsView/Winforms/StartScreen.cs b/AssetsView/Winforms/StartScreen.cs index 391ba9d..0ba4f33 100644 --- a/AssetsView/Winforms/StartScreen.cs +++ b/AssetsView/Winforms/StartScreen.cs @@ -463,7 +463,7 @@ private void viewTextureToolStripMenuItem_Click(object sender, EventArgs e) AssetTypeValueField baseField = helper.GetTypeInstance(currentFile.file, info).GetBaseField(); TextureViewer texView = new TextureViewer(currentFile, baseField); - texView.ShowDialog(); + texView.Show(); } } diff --git a/AssetsView/Winforms/TextureViewer.cs b/AssetsView/Winforms/TextureViewer.cs index 5561ec2..4ea51b7 100644 --- a/AssetsView/Winforms/TextureViewer.cs +++ b/AssetsView/Winforms/TextureViewer.cs @@ -31,7 +31,7 @@ public TextureViewer(AssetsFileInstance inst, AssetTypeValueField baseField) //bundle resS TextureFile.StreamingInfo streamInfo = tf.m_StreamData; - if (streamInfo.path.StartsWith("archive:/") && inst.parentBundle != null) + if (streamInfo.path != null && streamInfo.path.StartsWith("archive:/") && inst.parentBundle != null) { string searchPath = streamInfo.path.Substring(9); searchPath = Path.GetFileName(searchPath);