Search Issue Tracker

Fixed in 5.4.1

Votes

0

Found in

5.4.0f3

Issue ID

820528

Regression

No

Assigning a value to an element in a SyncListString that was previously null throws a NullReferenceException

Scripting

-

Steps to reproduce:
1) Open the attached project.
2) Open scene 'Bug'.
3) Press Play.
4) Press 'Lan Host(H).
5) Press 'Set Element Random'.

An exception is thrown in the console:
NullReferenceException: Object reference not set to an instance of an object
UnityEngine.Networking.SyncList`1[T].set_Item (Int32 i, .T value) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/SyncList.cs:444)
Player.CmdSetSomeStrings (System.String newValue) (at Assets/Player.cs:21)
Player.CallCmdSetSomeStrings (System.String newValue)
Player.OnGUI () (at Assets/Player.cs:42)

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.