Bug 1670970 [Linux] Check GdkWindow before we pass it to gdk_window_get_origin(), r=jhorak

Differential Revision: https://phabricator.services.mozilla.com/D96426
This commit is contained in:
stransky 2020-11-10 07:25:06 +00:00
Родитель 17d3157e82
Коммит 5facf40272
1 изменённых файлов: 3 добавлений и 1 удалений

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

@ -383,7 +383,9 @@ static void UpdateLastInputEventTime(void* aGdkEvent) {
} }
void GetWindowOrigin(GdkWindow* aWindow, int* aX, int* aY) { void GetWindowOrigin(GdkWindow* aWindow, int* aX, int* aY) {
gdk_window_get_origin(aWindow, aX, aY); if (aWindow) {
gdk_window_get_origin(aWindow, aX, aY);
}
// TODO(bug 1655924): gdk_window_get_origin is can block waiting for the x // TODO(bug 1655924): gdk_window_get_origin is can block waiting for the x
// server for a long time, we would like to use the implementation below // server for a long time, we would like to use the implementation below