graphics: imageImpl.restorable might be nil when restoring

This commit is contained in:
Hajime Hoshi 2017-01-21 05:10:10 +09:00
parent 53952100d3
commit a1885458fb

View File

@ -220,6 +220,9 @@ func (i *imageImpl) resetPixelsIfDependingOn(target *imageImpl, context *opengl.
func (i *imageImpl) hasDependency() bool {
i.m.Lock()
defer i.m.Unlock()
if i.restorable == nil {
return false
}
return i.restorable.HasDependency()
}