-Null element check for custom interface

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1676 eee81c28-f429-11dd-99c0-75d572ba1ddd
master
Jacob Brookover 2010-08-21 01:08:24 +00:00
parent 393774760b
commit 8bedfda8c4
1 changed files with 5 additions and 3 deletions

View File

@ -2973,9 +2973,11 @@
var i = shortcutButtons.length;
while (i--) {
var button = document.getElementById(shortcutButtons[i]);
var title = button.title;
var index = title.indexOf("Ctrl+");
button.title = [title.substr(0,index), "Cmd+", title.substr(index+5)].join('');
if (button != null) {
var title = button.title;
var index = title.indexOf("Ctrl+");
button.title = [title.substr(0, index), "Cmd+", title.substr(index + 5)].join('');
}
}
}