Skip to content

Commit

Permalink
User Agent Null Reference exception
Browse files Browse the repository at this point in the history
Summary: Fix null reference when setting up WitConfiguration

Reviewed By: yolanother

Differential Revision: D36493248

fbshipit-source-id: 8e6dc646d6064f71993945f84300c7e8f85e2404
  • Loading branch information
ryanbailey-fb authored and facebook-github-bot committed May 18, 2022
1 parent 3472557 commit bef3620
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Scripts/Runtime/WitRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ public static string GetUserAgent(WitConfiguration configuration)

#if UNITY_EDITOR
string userEditor = "Editor";
if (string.IsNullOrEmpty(configuration.configId))
if (configuration != null && string.IsNullOrEmpty(configuration.configId))
{
configuration.configId = Guid.NewGuid().ToString();
UnityEditor.EditorUtility.SetDirty(configuration);
Expand Down

0 comments on commit bef3620

Please sign in to comment.