Skip to content

Commit f8677f4

Browse files
authored
Merge pull request #75 from ExtendRealityLtd/fix/creator-null-error
fix(AxisCreator): prevent null exception if no axis found - fixes #74
2 parents 571d134 + 529532c commit f8677f4

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

Editor/UnityInputManagerAxisCreator.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,10 @@ private static bool AxisDefined(string axisName)
182182
while (axesProperty.Next(false))
183183
{
184184
SerializedProperty axis = axesProperty.Copy();
185-
axis.Next(true);
186-
if (axis.stringValue == axisName) return true;
185+
if (axis.Next(true))
186+
{
187+
if (axis.stringValue == axisName) return true;
188+
}
187189
}
188190
return false;
189191
}

0 commit comments

Comments
 (0)