From a1885458fbb2557afd36ab04c3bec17ab05dc820 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sat, 21 Jan 2017 05:10:10 +0900 Subject: [PATCH] graphics: imageImpl.restorable might be nil when restoring --- imageimpl.go | 3 +++ 1 file changed, 3 insertions(+) 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() }