Skip to content

Commit 440a046

Browse files
authored
Fix: Possible crash on assembly fetching for third party assemblies (#815)
* Fixes possible crash on assembly fetching for third party assemblies * Updates Changelog
1 parent 507575c commit 440a046

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

doc/100-General/10-Changelog.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ Released closed milestones can be found on [GitHub](https://github.com/Icinga/ic
1111

1212
[Issues and PRs](https://github.com/Icinga/icinga-powershell-framework/milestone/38)
1313

14+
## 1.13.4 (tbd)
15+
16+
[Issues and PRs](https://github.com/Icinga/icinga-powershell-framework/milestone/42)
17+
18+
* [#815](https://github.com/Icinga/icinga-powershell-framework/pull/815) Fixes a possible crash for `Test-IcingaAddTypeExist`, causing the Icinga for Windows installation to fail when third party components are checked which are malfunctioning
19+
1420
## 1.13.3 (2025-05-08)
1521

1622
[Issues and PRs](https://github.com/Icinga/icinga-powershell-framework/milestone/39)

lib/core/tools/Test-IcingaAddTypeExist.psm1

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,15 @@ function Test-IcingaAddTypeExist()
3131
}
3232

3333
foreach ($entry in [System.AppDomain]::CurrentDomain.GetAssemblies()) {
34-
if ($entry.GetTypes() -Match $Type) {
35-
$LoadedTypes.Add($Type, $TRUE);
34+
try {
35+
if ($entry.GetTypes() -Match $Type) {
36+
$LoadedTypes.Add($Type, $TRUE);
3637

37-
Set-IcingaPrivateEnvironmentVariable -Name 'AddTypeFunctions' -Value $LoadedTypes;
38+
Set-IcingaPrivateEnvironmentVariable -Name 'AddTypeFunctions' -Value $LoadedTypes;
3839

39-
return $TRUE;
40+
return $TRUE;
41+
}
42+
} catch {
4043
}
4144
}
4245

0 commit comments

Comments
 (0)