Support => NGUI 3 Support => Topic started by: capitalj on July 09, 2014, 07:09:39 PM
Title: UIPopupList error message
Post by: capitalj on July 09, 2014, 07:09:39 PM
Hi,
Sometimes I get this error: NullReferenceException: Object reference not set to an instance of an object UIPopupList.GetHighlightPosition () (at Assets/NGUI/Scripts/Interaction/UIPopupList.cs:447) UIPopupList+<UpdateTweenPosition>c__Iterator2B.MoveNext () (at Assets/NGUI/Scripts/Interaction/UIPopupList.cs:472)
when I open a uipopuplist. It doesn't seem to cause any problems as the correct item is selected and it all looks fine, but just wanted to report it anyways. I can't seem to find a reliable way to repro it as the same popup will work without the error most of the time.
-JJ
Title: Re: UIPopupList error message
Post by: ArenMook on July 10, 2014, 08:13:27 PM
Sounds like the "mHighlight" is null at that point. Curious, but can be avoided with a null check: