diff options
author | Val Doroshchuk <valentyn.doroshchuk@qt.io> | 2019-08-27 11:15:03 +0200 |
---|---|---|
committer | VaL Doroshchuk <valentyn.doroshchuk@qt.io> | 2019-08-29 08:22:32 +0000 |
commit | 012affe3194a48d8bb10d0a100f1d1bbb24ecf7e (patch) | |
tree | 60a9033fffbe2f3a3da1cc55fe0c81c5f78a500b | |
parent | a409efbc5530ad1e8becb018e1ad3319b931b2f3 (diff) |
DirectShow: Fix crash when there is no surface on flush()
When QDeclarativeRendererBackend is being destroyed, it clears the
surface and postpones releasing IMediaControl, which is done on worker
thread. It also calls flush() where null surface is used.
Fixes: QTBUG-77829
Change-Id: I327583c1f8fb7585dbec3c3fb7e80d0155cc4819
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
-rw-r--r-- | src/plugins/common/evr/evrcustompresenter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/common/evr/evrcustompresenter.cpp b/src/plugins/common/evr/evrcustompresenter.cpp index 470f670e4..0265c431b 100644 --- a/src/plugins/common/evr/evrcustompresenter.cpp +++ b/src/plugins/common/evr/evrcustompresenter.cpp @@ -1143,7 +1143,7 @@ HRESULT EVRCustomPresenter::flush() sample->Release(); m_frameStep.samples.clear(); - if (m_renderState == RenderStopped && m_surface->isActive()) { + if (m_renderState == RenderStopped && m_surface && m_surface->isActive()) { // Repaint with black. presentSample(NULL); } |