Change X11 entry assembly search and provide null fallback
This commit is contained in:
parent
80a9959247
commit
26fac6f032
1 changed files with 6 additions and 2 deletions
|
@ -228,7 +228,7 @@ namespace OpenTK.Platform.X11
|
|||
{
|
||||
foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies())
|
||||
{
|
||||
if (AppDomain.CurrentDomain.FriendlyName.EndsWith(assembly.ManifestModule.Name))
|
||||
if (assembly.ManifestModule.Name.Contains(AppDomain.CurrentDomain.FriendlyName))
|
||||
{
|
||||
if (entry_assembly == null || assembly.ManifestModule.Name.Length > entry_assembly.ManifestModule.Name.Length)
|
||||
{
|
||||
|
@ -238,7 +238,11 @@ namespace OpenTK.Platform.X11
|
|||
}
|
||||
}
|
||||
|
||||
var name = entry_assembly.GetName().Name;
|
||||
var name = "null";
|
||||
if (entry_assembly != null)
|
||||
{
|
||||
name = entry_assembly.GetName().Name;
|
||||
}
|
||||
class_hint.Class = name;
|
||||
class_hint.Name = name.ToLower();
|
||||
|
||||
|
|
Loading…
Reference in a new issue