Search Issue Tracker

Fixed in 2019.3.X

Fixed in 2019.1.X

Votes

0

Found in

2019.1.0a5

2019.1.0a14

2019.2.0a1

Issue ID

1118426

Regression

No

HorizontalOrVerticalLayoutGroup throws NullReferenceException when inspecting element that contains Image with no Material

uGUI

-

How to reproduce:
1. Open the attached "UIBug.zip" project
2. Double-click the "Assets/SummarySongEntry" nested prefab
3. Observe the Console window
Optional:
4. From the Hierarchy, select "SongNameArtistPanel" (that has Image component with no Material set)

Expected result: There are no NullReferenceExceptions in the Console.
Actual result: Game objects that have "Vertical Layout Group" component throw NullReferenceExceptions.

Reproducible with - 2019.1.0a5, 2019.1.0a14, 2019.2.0a2
Not reproducible with - 2018.3.3f1, 2019.1.0a4

Error thrown:
NullReferenceException: Object reference not set to an instance of an object
UnityEngine.UI.HorizontalOrVerticalLayoutGroup.Update () (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/Layout/HorizontalOrVerticalLayoutGroup.cs:266)

  1. Resolution Note (fix version 2019.3):

    Fixed in 2019.1.0b3

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.