diff --git a/imageimpl.go b/imageimpl.go index d03c633d3..9d5bfa7de 100644 --- a/imageimpl.go +++ b/imageimpl.go @@ -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() }