mirror of
https://github.com/RTimothyEdwards/magic.git
synced 2026-08-22 06:07:34 +02:00
Corrected another similar bit of code causing a segfault. It is
not known, though, why the flag is set indicating valid planes in the clientdata record when there in fact is none. That seems to be the underlying bug.
This commit is contained in:
@@ -1497,6 +1497,10 @@ CIFReadCellCleanup(filetype)
|
||||
|
||||
UndoDisable();
|
||||
|
||||
/* cifplanes should be valid, but don't crash magic if not */
|
||||
if (cifplanes != (ClientData)CLIENTDEFAULT)
|
||||
{
|
||||
|
||||
for (pNum = 0; pNum < MAXCIFRLAYERS; pNum++)
|
||||
{
|
||||
if (cifplanes[pNum] != NULL)
|
||||
@@ -1506,6 +1510,7 @@ CIFReadCellCleanup(filetype)
|
||||
}
|
||||
}
|
||||
freeMagic((char *)def->cd_client);
|
||||
}
|
||||
def->cd_client = (ClientData)CLIENTDEFAULT;
|
||||
|
||||
#if 0
|
||||
|
||||
Reference in New Issue
Block a user