Skip to content
Snippets Groups Projects
Commit 3961a9e8 authored by andreykproductengine's avatar andreykproductengine
Browse files

SL-11061 Viewer crashes on launch if serial is either unset or does not return a string

parent 47bb094b
No related branches found
No related tags found
No related merge requests found
...@@ -1073,6 +1073,7 @@ Nicky Dasmijn ...@@ -1073,6 +1073,7 @@ Nicky Dasmijn
MAINT-6665 MAINT-6665
SL-10291 SL-10291
SL-10293 SL-10293
SL-11061
Nicky Perian Nicky Perian
OPEN-1 OPEN-1
STORM-1087 STORM-1087
......
...@@ -217,6 +217,13 @@ S32 LLMachineID::init() ...@@ -217,6 +217,13 @@ S32 LLMachineID::init()
// Get the value of the Name property // Get the value of the Name property
hr = pclsObj->Get(L"SerialNumber", 0, &vtProp, 0, 0); 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; LL_INFOS("AppInit") << " Serial Number : " << vtProp.bstrVal << LL_ENDL;
// use characters in the returned Serial Number to create a byte array of size len // use characters in the returned Serial Number to create a byte array of size len
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment