mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-06 05:50:31 +00:00
Fix crash in GuiEditCanvas::save()
Fixes crash in GuiEditCanvas::save() if file location can't be written to.
This commit is contained in:
parent
9239101303
commit
c682830dd5
1 changed files with 7 additions and 1 deletions
|
|
@ -436,7 +436,13 @@ function GuiEditCanvas::save( %this, %selectedOnly, %noPrompt )
|
|||
%fileObject.delete();
|
||||
|
||||
%fo = new FileObject();
|
||||
%fo.openForWrite(%filename);
|
||||
if(!%fo.openForWrite(%filename))
|
||||
{
|
||||
error("GuiEditCanvas::save() - Unable to save, file location not open for writing.");
|
||||
%fo.close();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// Write out the captured TorqueScript that was before the object before the object
|
||||
for( %i = 0; %i <= %beforeLines; %i++)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue