Skip to content

Commit

Permalink
Avoid another NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
janodvarko committed May 11, 2012
1 parent 7706f47 commit 1684cdb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 10 additions & 1 deletion extension/content/firebug/css/computedPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,18 @@ CSSComputedPanel.prototype = Obj.extend(Firebug.Panel,
var href = selector.href;
var line = selector.ruleLine;
var rule = selector.selector._cssRule._domRule;

if (!rule.parentStyleSheet)
{
FBTrace.sysout("computedPanel.getSourceLink; no parent Stylesheet! " +
"ERROR FIX ME");
return null;
}

var instance = Css.getInstanceForStyleSheet(rule.parentStyleSheet);
var sourceLink = line != -1 ? new SourceLink.SourceLink(href, line, "css",
rule, instance) : null;

var sourceLink = line != -1 ? new SourceLink.SourceLink(href, line, "css", rule, instance) : null;
return sourceLink;
}
}),
Expand Down
2 changes: 1 addition & 1 deletion extension/content/firebug/css/cssPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ Firebug.CSSStyleSheetPanel.prototype = Obj.extend(Firebug.Panel,
if (FBTrace.DBG_ERRORS && FBTrace.DBG_CSS)
{
FBTrace.sysout("cssPanel.getStyleSheetRules; Missing Namespace! " +
"FIX ME", rule);
"ERROR FIX ME", rule);
}
}
}
Expand Down

1 comment on commit 1684cdb

@SebastianZ
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That should be fixed in a0d11dc.

Sebastian

Please sign in to comment.