Return 0 in QtGrabber::grabFrame() if error occurs in QtGrabber::setupDisplay()

Signed-off-by: Paulchen-Panther <Paulchen-Panter@protonmail.com>
This commit is contained in:
Paulchen-Panther 2019-07-16 23:49:25 +02:00
parent c676b640f1
commit 3a488e703c
No known key found for this signature in database
GPG Key ID: 84E3B692456B6840

View File

@ -96,6 +96,7 @@ void QtGrabber::geometryChanged(const QRect &geo)
int QtGrabber::grabFrame(Image<ColorRgb> & image)
{
if (!_enabled) return 0;
if(_screen == nullptr)
{
// reinit, this will disable capture on failure