InputField.ActivateInputField() giving NullReferenceException error

I have an input field (for a chat), and when enable the panel that the Input Field is in, I try to use InputField.ActivateInputField(); so that it can be immediately typed in to.
That line returns this error:

NullReferenceException: Object reference not set to an instance of an object
UnityEngine.UI.InputField.ActivateInputFieldInternal () (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/InputField.cs:1881)
UnityEngine.UI.InputField.LateUpdate () (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/InputField.cs:519)

For some weird reason it worked the first time, then just quit working.
I’m using Unity 5.0.0p3

EDIT: I also just installed Unity 5.0.1f1 and it still gives me the same error.

I just tested calling that method (ActivateInputField) multiple times per frame on an input field and it works. You probably have some other code that’s changing something from the InputField variable, but it’s hard to know since you didn’t share relevant information.

Share the full script that contains that InputField variable and any other script related. Also, explain or upload a screenshot of the inspector of the objects related to this.

One last thing, the latest official Unity release is 5.0.0f4, try to install the latest one unless you have a reason to use f1.