In case of an x64 environment phone devices cannot be listed, but
winrtrunner should not crash in this case.
Change-Id: I6963e1c4f2dc73424fa7ebde13cbce759dfaabc4
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
CoreConServer::CoreConServer() : d(new CoreConServerPrivate)
{
HRESULT hr = CoCreateInstance(CLSID_ConMan, NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&d->handle));
- qCDebug(lcCoreCon) << "Failed to initialize connection server." << formatError(hr);
+ if (FAILED(hr))
+ qCWarning(lcCoreCon) << "Failed to initialize connection server." << formatError(hr);
// The language module is available as long as the above succeeded
d->langModule = GetModuleHandle(L"conmanui");
{
qCDebug(lcCoreCon) << __FUNCTION__;
- if (!d->devices.isEmpty())
+ if (!d->devices.isEmpty() || !d->handle)
return d->devices;
ComPtr<ICcDatastore> dataStore;