mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-22 23:09:43 +00:00
Merge branch 'fix_async_write_png' into 'master'
Avoid starting async png writing when overlay image is null (#6638) Closes #6638 See merge request OpenMW/openmw!1679
This commit is contained in:
commit
55ff9b0c97
1 changed files with 2 additions and 0 deletions
|
@ -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…
Reference in a new issue