Index: third_party/google_input_tools/src/chrome/os/inputview/elements/element.js |
diff --git a/third_party/google_input_tools/src/chrome/os/inputview/elements/element.js b/third_party/google_input_tools/src/chrome/os/inputview/elements/element.js |
index 467b59694fa08752ee218a2ceef11c807a490521..48e7f8ba9bf325e65273e8175d70d6cd2bc20785 100644 |
--- a/third_party/google_input_tools/src/chrome/os/inputview/elements/element.js |
+++ b/third_party/google_input_tools/src/chrome/os/inputview/elements/element.js |
@@ -142,7 +142,10 @@ Element.prototype.isVisible = function() { |
* @param {boolean} visibility True if the element is visible. |
*/ |
Element.prototype.setVisible = function(visibility) { |
- this.getElement().style.display = visibility ? this.display_ : 'none'; |
+ // TODO: Figure out why element can be null. |
+ var element = this.getElement(); |
+ if (element) |
+ element.style.display = visibility ? this.display_ : 'none'; |
}; |