Skip to content

Commit 3d3de65

Browse files
Merge pull request #955 from StephenHodgson/HTK-local
Fixed null reference when setting icon in icon generator with bad dimensions.
2 parents 9ec5b8e + da10792 commit 3d3de65

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Assets/HoloToolkit/Utilities/Scripts/Editor/SetIconsWindow.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,10 @@ private static Texture2D CreateImageInput(string imageTitle, int width, int heig
129129
if (newIcon.width != width && newIcon.height != height)
130130
{
131131
// reset
132-
newIcon = texture;
133132
EditorUtility.DisplayDialog("Invalid Image",
134133
string.Format("{0} should be an image with preferred size of {1}x{2}. Provided image was: {3}x{4}.", imageTitle, width, height, newIcon.width, newIcon.height),
135134
"Ok");
135+
newIcon = texture;
136136
}
137137
else
138138
{

0 commit comments

Comments
 (0)