Skip to content

Commit

Permalink
Merge pull request #58 from zzxiang/pull-request-5119102102f6348a5768…
Browse files Browse the repository at this point in the history
…435164881f384c9f556b

Fixed NullReferenceException.
  • Loading branch information
kimsama authored May 1, 2018
2 parents d423107 + 257c2ac commit 4f092d5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions Assets/QuickSheet/ExcelPlugin/Editor/ExcelMachine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,12 @@ public int CurrentSheetIndex
/// </summary>

private void Awake() {
// excel and google plugin have its own template files,
// so we need to set the different path when the asset file is created.
TemplatePath = ExcelSettings.Instance.TemplatePath;
if (ExcelSettings.Instance != null)
{
// excel and google plugin have its own template files,
// so we need to set the different path when the asset file is created.
TemplatePath = ExcelSettings.Instance.TemplatePath;
}
}

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion Assets/QuickSheet/ExcelPlugin/Editor/ExcelMachineEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ protected override void OnEnable()
base.OnEnable();

machine = target as ExcelMachine;
if (machine != null)
if (machine != null && ExcelSettings.Instance != null)
{
if (string.IsNullOrEmpty(ExcelSettings.Instance.RuntimePath) == false)
machine.RuntimeClassPath = ExcelSettings.Instance.RuntimePath;
Expand Down

0 comments on commit 4f092d5

Please sign in to comment.