[Xwt] If the native window is null, return null

This is a more logical behaviour and prevents us from hitting silly
null reference exceptions later on in the apps lifespan.

This probably explains some mysterious null reference exceptions we've
been seeing for the last few weeks.
This commit is contained in:
Alan McGovern 2013-01-03 17:27:36 +00:00
Родитель 754b15c626
Коммит 80bf8fb35d
1 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -88,6 +88,8 @@ namespace Xwt.Engine
public static WindowFrame WrapWindow (object nativeWindow)
{
if (nativeWindow == null)
return null;
return new NativeWindowFrame (Application.EngineBackend.GetBackendForWindow (nativeWindow));
}
}