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 get icon #156

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Fix get icon #156

wants to merge 3 commits into from

Conversation

svr333
Copy link

@svr333 svr333 commented Nov 20, 2021

Description

In larger applications with multiple assemblies, entry assembly may be null.
This will cause issues when trying to display an AcrylicWindow for example, which uses the AppIcon.
(Even when AcrylicWindowStyle is set to NoIcon / None)

The reason I used Assembly#GetExecutingAssembly over Assembly#GetCallingAssembly can be found here.
It does not matter in my case but it may in someone elses.

The fix is also written in a way that will not affect other programs, only if the EntryAssembly returns null, it will get the ExecutingAssembly.

Related Issue

Resolves #87

Extra

I also removed the using statements that were not in use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Null reference exception when using AcrylicWindow from Excel VSTO Addin
1 participant