Fix apply / reload failure

This commit is contained in:
Nathan Gray 2012-05-29 23:05:26 +00:00
parent de01faf0df
commit 36fa6e27be
2 changed files with 6 additions and 6 deletions

View File

@ -144,13 +144,13 @@ var et2_historylog = et2_valueWidget.extend([et2_IDataProvider],{
{
this.fields[key].widget.destroy();
}
this.diff.widget.destroy();
if(this.diff) this.diff.widget.destroy();
// Free the grid components
this.dataview.free();
this.rowProvider.free();
this.controller.free();
this.dynheight.free();
if(this.dataview) this.dataview.free();
if(this.rowProvider) this.rowProvider.free();
if(this.controller) this.controller.free();
if(this.dynheight) this.dynheight.free();
this._super.apply(this, arguments);
},

View File

@ -695,7 +695,7 @@ var et2_link = et2_valueWidget.extend([et2_IDetachedDOM], {
this.setDOMNode(this.link[0]);
},
destroy: function() {
this.link.unbind();
if(this.link) this.link.unbind();
this.link = null;
},