Skip to content

Commit

Permalink
gles: Fix panic when calling ID() with nil context
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-clayton committed Sep 11, 2017
1 parent cb37b9d commit 80071ff
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gapis/api/gles/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ func (c *Context) Name() string {

// ID returns the context's unique identifier.
func (c *Context) ID() api.ContextID {
if c == nil {
return api.ContextID{}
}
return api.ContextID(id.OfString(fmt.Sprintf("GLES Context %v", c.Identifier)))
}

Expand Down

0 comments on commit 80071ff

Please sign in to comment.