Permalink
Browse files

Avoid NPE, the child can be null

  • Loading branch information...
1 parent dff37c9 commit 489173bfe423a37fc61a44cca37af1384cf14b63 @janodvarko janodvarko committed Nov 19, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 extension/content/firebug/css/stylePanel.js
@@ -876,9 +876,13 @@ function getFontPropValueParts(element, value, propName)
var child = element.firstChild;
do
{
+ if (!child)
+ break;
+
if (child.nodeType == Node.TEXT_NODE)
usedFonts = Arr.extendArray(usedFonts, Fonts.getFonts(child));
- } while (child = child.nextSibling);
+ }
+ while (child = child.nextSibling);
var genericFontUsed = false;
for (var i = 0; i < fonts.length; ++i)

0 comments on commit 489173b

Please sign in to comment.