mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-26 21:09:26 +02:00
pastojs: fixed freeing temp intf var if nil
git-svn-id: trunk@48155 -
This commit is contained in:
parent
4e61867ce1
commit
c21e777c85
11
utils/pas2js/dist/rtl.js
vendored
11
utils/pas2js/dist/rtl.js
vendored
@ -739,15 +739,20 @@ var rtl = {
|
||||
delete this[id];
|
||||
old._Release(); // may fail
|
||||
}
|
||||
this[id]=intf;
|
||||
if(intf) {
|
||||
this[id]=intf;
|
||||
}
|
||||
return intf;
|
||||
},
|
||||
free: function(){
|
||||
//console.log('rtl.intfRefs.free...');
|
||||
for (var id in this){
|
||||
if (this.hasOwnProperty(id)){
|
||||
//console.log('rtl.intfRefs.free: id='+id+' '+this[id].$name+' $o='+this[id].$o.$classname);
|
||||
this[id]._Release();
|
||||
var intf = this[id];
|
||||
if (intf){
|
||||
//console.log('rtl.intfRefs.free: id='+id+' '+intf.$name+' $o='+intf.$o.$classname);
|
||||
intf._Release();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user