Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix crash/freeze on systems with no AdskIdentityManager or any adsk product #15042

Merged
merged 3 commits into from
Mar 22, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions src/DynamoCore/Core/IDSDKManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -213,14 +213,14 @@ private string IDSDK_GetToken()

private bool Initialize()
{
if (Client.IsInitialized()) return true;
idsdk_status_code bRet = Client.Init();

if (Client.IsSuccess(bRet))
try
{
if (Client.IsInitialized())
if (Client.IsInitialized()) return true;
idsdk_status_code bRet = Client.Init();

if (Client.IsSuccess(bRet))
{
try
if (Client.IsInitialized())
{
IntPtr hWnd = Process.GetCurrentProcess().MainWindowHandle;
if (hWnd != null)
Expand All @@ -238,13 +238,13 @@ private bool Initialize()
return ret;
}
}
catch (Exception)
{
return false;
}
}
return false;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any time we return false, should we perhaps also log something to the console?

}
catch (Exception)
{
return false;
}
return false;
}
private bool Deinitialize()
{
Expand Down
Loading