mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
Release memory
This commit is contained in:
parent
390be98140
commit
3c0a251f71
1 changed files with 2 additions and 0 deletions
|
|
@ -1436,6 +1436,7 @@ DefineEngineFunction(saveScaledImage, bool, (const char* bitmapSource, const cha
|
|||
if (!fs.open(destinationPath.getFullPath(), Torque::FS::File::Write))
|
||||
{
|
||||
Con::errorf("saveScaledImage() - Failed to open output file '%s'!", bitmapDest);
|
||||
delete image;
|
||||
return false;
|
||||
}
|
||||
else
|
||||
|
|
@ -1443,6 +1444,7 @@ DefineEngineFunction(saveScaledImage, bool, (const char* bitmapSource, const cha
|
|||
image->writeBitmap("png", fs);
|
||||
|
||||
fs.close();
|
||||
delete image;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue