Commit 01a5e56d authored by Fushan Wen's avatar Fushan Wen
Browse files

libtaskmanager: assign stream and check null pointer

BUG: 459232
FIXED-IN: 5.26


(cherry picked from commit 8173aff4)
parent 8a35e341
Pipeline #234002 passed with stage
in 11 minutes and 32 seconds
......@@ -38,7 +38,9 @@ void ScreencastingRequest::setUuid(const QString &uuid)
return;
}
d->m_stream->deleteLater();
if (!d->m_stream.isNull()) {
d->m_stream->deleteLater();
}
setNodeid(0);
d->m_uuid = uuid;
......@@ -71,6 +73,8 @@ void ScreencastingRequest::setOutputName(const QString &outputName)
void ScreencastingRequest::adopt(ScreencastingStream *stream)
{
d->m_stream = stream;
connect(stream, &ScreencastingStream::created, this, &ScreencastingRequest::setNodeid);
connect(stream, &ScreencastingStream::failed, this, [](const QString &error) {
qWarning() << "error creating screencast" << error;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment