]> git.sesse.net Git - remoteglot/commitdiff
Fix a null pointer exception in the frontend.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Tue, 15 Nov 2016 22:03:38 +0000 (23:03 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Tue, 15 Nov 2016 22:03:38 +0000 (23:03 +0100)
www/js/remoteglot.js

index b049c32ea81bc52c63b1cbb19172d7c769778b21..333bd5c415a458fdd6f9e0808e02a44fdfc4daaf 100644 (file)
@@ -772,7 +772,7 @@ window['collapse_history'] = collapse_history;
  * Also recreates the global "display_lines".
  */
 var update_refutation_lines = function() {
  * Also recreates the global "display_lines".
  */
 var update_refutation_lines = function() {
-       if (base_fen === null) {
+       if (base_fen === null || current_display_line === null) {
                return;
        }
        if (display_lines.length > 2) {
                return;
        }
        if (display_lines.length > 2) {