mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-03 20:49:27 +00:00
Fixing leaking of GraphioStates in nsRenderingContextMac destructor
This commit is contained in:
parent
f6f33a44f1
commit
9de778d6ae
@ -293,7 +293,7 @@ nsRenderingContextMac::~nsRenderingContextMac()
|
||||
PRInt32 cnt = mGSArray->Count();
|
||||
for (PRInt32 i = 0; i < cnt; i ++)
|
||||
{
|
||||
GraphicState* gs = (GraphicState*)mGSArray->ElementAt(cnt);
|
||||
GraphicState* gs = (GraphicState*)mGSArray->ElementAt(i);
|
||||
if (gs)
|
||||
delete gs;
|
||||
}
|
||||
@ -308,7 +308,7 @@ nsRenderingContextMac::~nsRenderingContextMac()
|
||||
PRInt32 cnt = mGSStack->Count();
|
||||
for (PRInt32 i = 0; i < cnt; i ++)
|
||||
{
|
||||
GraphicState* gs = (GraphicState*)mGSStack->ElementAt(cnt);
|
||||
GraphicState* gs = (GraphicState*)mGSStack->ElementAt(i);
|
||||
if (gs)
|
||||
delete gs;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user