Web Inspector: JS exception upon clicking on "Word Wrap" checkbox in Settings screen
authorcaseq@chromium.org <caseq@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 27 Sep 2011 12:21:24 +0000 (12:21 +0000)
committercaseq@chromium.org <caseq@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 27 Sep 2011 12:21:24 +0000 (12:21 +0000)
https://bugs.webkit.org/show_bug.cgi?id=68888

Reviewed by Pavel Feldman.

* inspector/front-end/ElementsPanel.js:
(WebInspector.ElementsPanel.prototype._domWordWrapSettingChanged):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@96098 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/inspector/front-end/ElementsPanel.js

index eb758e3..0556cfa 100644 (file)
@@ -1,3 +1,13 @@
+2011-09-27  Andrey Kosyakov  <caseq@chromium.org>
+
+        Web Inspector: JS exception upon clicking on "Word Wrap" checkbox in Settings screen
+        https://bugs.webkit.org/show_bug.cgi?id=68888
+
+        Reviewed by Pavel Feldman.
+
+        * inspector/front-end/ElementsPanel.js:
+        (WebInspector.ElementsPanel.prototype._domWordWrapSettingChanged):
+
 2011-09-21  Pavel Podivilov  <podivilov@chromium.org>
 
         Web Inspector: migrate RawSourceCode clients to SourceMapping class.
index e0b64d1..6b6717c 100644 (file)
@@ -288,7 +288,11 @@ WebInspector.ElementsPanel.prototype = {
         else
             this.contentElement.addStyleClass("nowrap");
 
-        var treeElement = this.treeOutline.findTreeElement(this.selectedDOMNode());
+        var selectedNode = this.selectedDOMNode();
+        if (!selectedNode)
+            return;
+
+        var treeElement = this.treeOutline.findTreeElement(selectedNode);
         if (treeElement)
             treeElement.updateSelection(); // Recalculate selection highlight dimensions.
     },