Skip to content

Commit 90bc1dd

Browse files
committed
Adjust expiration (only after svg destroyed)
1 parent 20f1d27 commit 90bc1dd

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

Client/mods/deathmatch/logic/CClientVectorGraphicDisplay.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,11 @@ CClientVectorGraphicDisplay::CClientVectorGraphicDisplay(CClientDisplayManager*
2525

2626
void CClientVectorGraphicDisplay::Render()
2727
{
28+
// When the underlying vector graphic is deleted, this display will be destroyed automatically by the manager.
29+
// CClientVectorGraphicDisplay::Render should be called as long as the display manager is still alive.
30+
// see CClientDisplayManager::DoPulse
2831
if (!m_pVectorGraphic || m_pVectorGraphic->IsDestroyed())
29-
return;
32+
return SetTimeTillExpiration(1);
3033

3134
if (!m_bVisible)
3235
{
@@ -42,10 +45,6 @@ void CClientVectorGraphicDisplay::Render()
4245
{
4346
m_pVectorGraphic->OnUpdate();
4447
}
45-
46-
// if we don't update the SVG, or vector graphic is deleted, after 60 seconds the display manager will destroy it
47-
// see CClientDisplayManager::DoPulse
48-
SetTimeTillExpiration(60 * 1000);
4948
}
5049

5150
void CClientVectorGraphicDisplay::UnpremultiplyBitmap(Bitmap& bitmap)

0 commit comments

Comments
 (0)