_get_camera should first verify both that camera is not null and not

closed before returning the cached object
This commit is contained in:
Fabio Manganiello 2019-08-16 19:15:00 +02:00
parent 5ca8ee594f
commit b599c622c4
1 changed files with 1 additions and 1 deletions

View File

@ -63,7 +63,7 @@ class CameraPiPlugin(CameraPlugin):
# noinspection PyUnresolvedReferences,PyPackageRequirements
def _get_camera(self, **opts):
if self._camera:
if self._camera and not self._camera.closed:
return self._camera
import picamera