Author Topic: bug report in UICamera.cs  (Read 2724 times)

Gillissie

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 48
    • View Profile
bug report in UICamera.cs
« on: August 23, 2012, 12:00:35 PM »
This code in UICamera.cs needs to have the nullcheck on currentTouch.pressed to avoid null reference errors if the clicked object was deleted upon the first click:

  1. if (currentTouch.clickTime + 0.25f > time && currentTouch.pressed != null)
  2. {
  3.         currentTouch.pressed.SendMessage("OnDoubleClick", SendMessageOptions.DontRequireReceiver);
  4. }
  5.  

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: bug report in UICamera.cs
« Reply #1 on: August 23, 2012, 07:53:18 PM »
Are you running some old version? That code doesn't exist. Everything goes through the Notify function now.