mirror of
https://github.com/narzoul/DDrawCompat
synced 2024-12-30 08:55:36 +01:00
Increment clipper ref count while attached to a surface
Fixes a crash in Midtown Madness startup. Clipper attached to primary surface was destroyed before Surface destructor was executed.
This commit is contained in:
parent
00a78097d2
commit
2b691ebdc7
@ -166,6 +166,7 @@ namespace DDraw
|
||||
}
|
||||
g_clipperData.erase(it->second);
|
||||
}
|
||||
getOrigVtable(prevClipper).Release(prevClipper);
|
||||
g_surfaceToClipperData.erase(it);
|
||||
}
|
||||
|
||||
@ -183,6 +184,7 @@ namespace DDraw
|
||||
}
|
||||
++clipperDataIter->second.refCount;
|
||||
g_surfaceToClipperData[&surface] = clipperDataIter;
|
||||
getOrigVtable(clipper).AddRef(clipper);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user