Skip to content
This repository has been archived by the owner on Jan 18, 2022. It is now read-only.

Commit

Permalink
fix nil pointer when parsing incorrect JSON
Browse files Browse the repository at this point in the history
  • Loading branch information
skanehira committed Nov 23, 2019
1 parent ca51ccc commit 669f19f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gui/gui.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,9 @@ func (g *Gui) MakeJSON(node *tview.TreeNode) interface{} {
}
return i
case Key:
if len(node.GetChildren()) == 0 {
return ""
}
v := node.GetChildren()[0]
if v.GetReference().(Reference).JSONType == Value {
return g.parseValue(v)
Expand Down

0 comments on commit 669f19f

Please sign in to comment.