From 50ba55a9883c33a7c727bc8b74193c3a7c657fef Mon Sep 17 00:00:00 2001 From: Zach Fox Date: Tue, 10 Sep 2019 13:03:40 -0700 Subject: [PATCH] Protect against engine not returning a valid CPU/GPU object --- .../qml/hifi/simplifiedUI/helpApp/about/HelpAbout.qml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/interface/resources/qml/hifi/simplifiedUI/helpApp/about/HelpAbout.qml b/interface/resources/qml/hifi/simplifiedUI/helpApp/about/HelpAbout.qml index 4a36232029..a4a6575d1e 100644 --- a/interface/resources/qml/hifi/simplifiedUI/helpApp/about/HelpAbout.qml +++ b/interface/resources/qml/hifi/simplifiedUI/helpApp/about/HelpAbout.qml @@ -167,7 +167,7 @@ Flickable { Component.onCompleted: { var cpu = JSON.parse(PlatformInfo.getCPU(0)); var cpuModel = cpu.model; - if (cpuModel.length === 0) { + if (!cpuModel || cpuModel.length === 0) { cpuModel = "Unknown"; } @@ -213,7 +213,7 @@ Flickable { Component.onCompleted: { var gpu = JSON.parse(PlatformInfo.getGPU(PlatformInfo.getMasterGPU())); var gpuModel = gpu.model; - if (gpuModel.length === 0) { + if (!gpuModel || gpuModel.length === 0) { gpuModel = "Unknown"; } @@ -327,7 +327,7 @@ Flickable { var cpu = JSON.parse(PlatformInfo.getCPU(0)); var cpuModel = cpu.model; - if (cpuModel.length === 0) { + if (!cpuModel || cpuModel.length === 0) { cpuModel = "Unknown"; } @@ -338,7 +338,7 @@ Flickable { var gpu = JSON.parse(PlatformInfo.getGPU(PlatformInfo.getMasterGPU())); var gpuModel = gpu.model; - if (gpuModel.length === 0) { + if (!gpuModel || gpuModel.length === 0) { gpuModel = "Unknown"; }