From 792f5191f972ecbf83a8cb4fa13cb004e76a8fc6 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Thu, 20 Oct 2022 22:14:22 +1100 Subject: [PATCH] Do not use PyAccess after re-assigning im --- src/PIL/IcoImagePlugin.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/PIL/IcoImagePlugin.py b/src/PIL/IcoImagePlugin.py index 17b9855a0..93b9dfdea 100644 --- a/src/PIL/IcoImagePlugin.py +++ b/src/PIL/IcoImagePlugin.py @@ -327,6 +327,7 @@ class IcoImageFile(ImageFile.ImageFile): # if tile is PNG, it won't really be loaded yet im.load() self.im = im.im + self.pyaccess = None self.mode = im.mode if im.size != self.size: warnings.warn("Image was not the expected size")