From 865be88ed541712008b223ca3407e553137bc800 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Tue, 26 May 2020 10:13:04 +0200 Subject: [PATCH] JournalView: avoid null dereference on quick tab switch the updateView method can be called through an XHR request callback, which may get triggered once the user switched already over to another panel and viewmodel isn't valid (or did not get valid at the first place) anymore. Signed-off-by: Thomas Lamprecht --- panel/JournalView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/panel/JournalView.js b/panel/JournalView.js index c376c88..c48dc25 100644 --- a/panel/JournalView.js +++ b/panel/JournalView.js @@ -62,7 +62,7 @@ Ext.define('Proxmox.panel.JournalView', { var me = this; var view = me.getView(); var viewmodel = me.getViewModel(); - if (viewmodel.get('livemode') !== livemode) { + if (!viewmodel || viewmodel.get('livemode') !== livemode) { return; // we switched mode, do not update the content } var contentEl = me.lookup('content');