Skip to content

Commit 119c595

Browse files
committed
Merge branch 'master' of github.com:tito/kivy
2 parents c2f4aee + 41ed48d commit 119c595

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

kivy/uix/image.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,7 @@ def __init__(self, **kwargs):
237237

238238
def on_source(self, instance, value):
239239
if not value:
240+
self._coreimage.unbind(on_texture=self._on_tex_change)
240241
self.texture = None
241242
self._coreimage = None
242243
else:
@@ -258,4 +259,5 @@ def is_uri(self, filename):
258259
return proto in ('http', 'https', 'ftp')
259260

260261
def _on_tex_change(self, *largs):
261-
self.texture = self._coreimage.texture
262+
if self._coreimage:
263+
self.texture = self._coreimage.texture

0 commit comments

Comments
 (0)