Skip to content

Commit 8767ca1

Browse files
committed
Fix a compile error since null propagating operator is not supported
1 parent aabb5ff commit 8767ca1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Assets/HTC.UnityPlugin/ViveInputUtility/Scripts/Misc/BasicGrabbable.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,10 @@ public void OnColliderEventPressUp(ColliderButtonEventData eventData)
281281
if (isGrabbed)
282282
{
283283
caster.canGrab = true;
284-
m_onDrop?.Invoke(this);
284+
if (m_onDrop != null)
285+
{
286+
m_onDrop.Invoke(this);
287+
}
285288
}
286289
caster.canGrab = true;
287290
}

0 commit comments

Comments
 (0)