Просмотр исходного кода

* [Context] check Visual before using it

master
Bergmann89 12 лет назад
Родитель
Сommit
371dc0877d
1 измененных файлов: 5 добавлений и 0 удалений
  1. +5
    -0
      uglcContextGtk2GLX.pas

+ 5
- 0
uglcContextGtk2GLX.pas Просмотреть файл

@@ -351,6 +351,9 @@ var
attrList: TGLIntArray; attrList: TGLIntArray;
drawable: PGdkDrawable; drawable: PGdkDrawable;
begin begin
if not Assigned(aControl) then
raise EArgumentException.Create('aControl is not assigned');
{ {
Temporary (realized) widget to get to display Temporary (realized) widget to get to display
} }
@@ -382,6 +385,8 @@ begin
FVisual := glXChooseVisual(FDisplay, DefaultScreen(FDisplay), @attrList[0]); FVisual := glXChooseVisual(FDisplay, DefaultScreen(FDisplay), @attrList[0]);
end; end;
end; end;
if not Assigned(FVisual) then
raise EGLXError.Create('choose visual failed');
{ {
Most widgets inherit the drawable of their parent. In contrast to Windows, descending from Most widgets inherit the drawable of their parent. In contrast to Windows, descending from


Загрузка…
Отмена
Сохранить