From 3961a9e80a5c46d969f34775483f0e7aa0dfb84c Mon Sep 17 00:00:00 2001 From: andreykproductengine <andreykproductengine@lindenlab.com> Date: Tue, 30 Apr 2019 15:24:49 +0300 Subject: [PATCH] SL-11061 Viewer crashes on launch if serial is either unset or does not return a string --- doc/contributions.txt | 1 + indra/newview/llmachineid.cpp | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/doc/contributions.txt b/doc/contributions.txt index a73bd10295..29fc71510b 100755 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -1073,6 +1073,7 @@ Nicky Dasmijn MAINT-6665 SL-10291 SL-10293 + SL-11061 Nicky Perian OPEN-1 STORM-1087 diff --git a/indra/newview/llmachineid.cpp b/indra/newview/llmachineid.cpp index c667b0af3f..51127928d1 100644 --- a/indra/newview/llmachineid.cpp +++ b/indra/newview/llmachineid.cpp @@ -217,6 +217,13 @@ S32 LLMachineID::init() // Get the value of the Name property hr = pclsObj->Get(L"SerialNumber", 0, &vtProp, 0, 0); + if (FAILED(hr)) + { + LL_WARNS() << "Failed to get SerialNumber. Error code = 0x" << hex << hres << LL_ENDL; + pclsObj->Release(); + pclsObj = NULL; + continue; + } LL_INFOS("AppInit") << " Serial Number : " << vtProp.bstrVal << LL_ENDL; // use characters in the returned Serial Number to create a byte array of size len -- GitLab