Bug 900228 - fix "TypeError: this.selectedEditor.sourceEditor is null" in mochitest runs; r=dcamp

This commit is contained in:
Heather Arthur 2013-08-03 14:34:00 -07:00
parent 80fa8cef4f
commit 204ad78052

View File

@ -149,7 +149,7 @@ StyleEditorUI.prototype = {
*/
_onStyleSheetsCleared: function() {
// remember selected sheet and line number for next load
if (this.selectedEditor) {
if (this.selectedEditor && this.selectedEditor.sourceEditor) {
let href = this.selectedEditor.styleSheet.href;
let {line, col} = this.selectedEditor.sourceEditor.getCaretPosition();
this.selectStyleSheet(href, line, col);