Skip to content

Commit 1340f18

Browse files
committed
fix possible null reference exceptions and bump version
1 parent 64228de commit 1340f18

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/UQuery.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace UnityEngine.Query
1+
namespace UnityEngine.Query
22
{
33
using System;
44
using System.Collections.Generic;
@@ -72,7 +72,7 @@ public static T SelectByPath<T>(string path) where T : class
7272

7373
if (@class is null)
7474
return target as T;
75-
return target.GetComponent<T>();
75+
return target?.GetComponent<T>();
7676
}
7777
private static GameObject Find(string name, string path)
7878
{

src/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "com.ivysola.uquery",
3-
"version": "1.0.2",
3+
"version": "1.0.3",
44
"displayName": "uquery",
55
"description": "Library for querying unity gameobject",
66
"unity": "2020.2",

0 commit comments

Comments
 (0)