Gtk2: fixed crash in gtk2.GetWindowRect. issue #21382

git-svn-id: trunk@35606 -
This commit is contained in:
zeljko 2012-02-27 11:31:06 +00:00
parent 847d8a2eba
commit 1c24c910b6

View File

@ -6143,7 +6143,7 @@ begin
begin
Widget := PGtkWidget(Handle);
if GTK_IS_WINDOW(Widget) then
if GTK_IS_WINDOW(Widget) and Assigned(Widget^.window) then
begin
gdk_window_get_origin(Widget^.window, @ARect.Left, @ARect.Top);
gdk_window_get_size(Widget^.window, @ARect.Right, @ARect.Bottom);