mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-09-17 08:26:50 -04:00
Avoid starting async png writing when overlay image is null
This commit is contained in:
parent
b03f9e430c
commit
6fd251e8f7
@ -635,6 +635,8 @@ namespace MWRender
|
|||||||
|
|
||||||
void GlobalMap::asyncWritePng()
|
void GlobalMap::asyncWritePng()
|
||||||
{
|
{
|
||||||
|
if (mOverlayImage == nullptr)
|
||||||
|
return;
|
||||||
// Use deep copy to avoid any sychronization
|
// Use deep copy to avoid any sychronization
|
||||||
mWritePng = new WritePng(new osg::Image(*mOverlayImage, osg::CopyOp::DEEP_COPY_ALL));
|
mWritePng = new WritePng(new osg::Image(*mOverlayImage, osg::CopyOp::DEEP_COPY_ALL));
|
||||||
mWorkQueue->addWorkItem(mWritePng, /*front=*/true);
|
mWorkQueue->addWorkItem(mWritePng, /*front=*/true);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user