From 5ba7957450ebe78c67cf675855f4f4c3a34fab54 Mon Sep 17 00:00:00 2001 From: Pavel Vomacka Date: Apr 25 2017 10:23:12 +0000 Subject: WebUI - Coverity: fixed null pointer exception The record variable could be null. This check makes sure that variable won't be null. Reviewed-By: Tomas Krizek --- diff --git a/install/ui/src/freeipa/field.js b/install/ui/src/freeipa/field.js index 76ce253..4cd9f13 100644 --- a/install/ui/src/freeipa/field.js +++ b/install/ui/src/freeipa/field.js @@ -888,7 +888,7 @@ field.Adapter = declare(null, { if (result) record = result[this.result_name]; var res_type = typeof record; var obj_in_type = typeof this.object_index; - if (res_type === 'object' && obj_in_type === 'number') + if (record && res_type === 'object' && obj_in_type === 'number') record = record[this.object_index]; } }