diff options
Diffstat (limited to 'tests/manual/rendercapture-cpp/mycapture.h')
-rw-r--r-- | tests/manual/rendercapture-cpp/mycapture.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/manual/rendercapture-cpp/mycapture.h b/tests/manual/rendercapture-cpp/mycapture.h index e142a5453..fea1abe46 100644 --- a/tests/manual/rendercapture-cpp/mycapture.h +++ b/tests/manual/rendercapture-cpp/mycapture.h @@ -89,9 +89,11 @@ public slots: void capture() { - m_reply = m_capture->requestCapture(); - connection = QObject::connect(m_reply, &Qt3DRender::QRenderCaptureReply::completed, - this, &MyCapture::onCompleted); + if (!m_reply) { + m_reply = m_capture->requestCapture(); + connection = QObject::connect(m_reply, &Qt3DRender::QRenderCaptureReply::completed, + this, &MyCapture::onCompleted); + } } private: |