Avoid GApplication being released twice on gtk_application_remove_window() calls
Avoid GApplication being released twice on gtk_application_remove_window() calls

Removing the window from the window list before setting the
application to %NULL avoids gtk_application_remove_window() triggering
another call to gtk_application_window_removed(), which would release
the application a second time.

https://bugzilla.gnome.org/show_bug.cgi?id=653053

alexlarsson/gtk,chergert/gtk,Sidnioulz/SandboxGtk,Lyude/gtk-,davidgumberg/gtk,Adamovskiy/gtk,grubersjoe/adwaita,msteinert/gtk,ebassi/gtk,Distrotech/gtk2,davidt/gtk,Sidnioulz/SandboxGtk,jessevdk/gtk,davidt/gtk,davidgumberg/gtk,davidt/gtk,ahodesuka/gtk,chergert/gtk,chergert/gtk,chergert/gtk,davidgumberg/gtk,jessevdk/gtk,chergert/gtk,msteinert/gtk,Distrotech/gtk2,alexlarsson/gtk,Adamovskiy/gtk,jigpu/gtk,Sidnioulz/SandboxGtk,bratsche/gtk-,Adamovskiy/gtk,bratsche/gtk-,jadahl/gtk,msteinert/gtk,alexlarsson/gtk,Adamovskiy/gtk,grubersjoe/adwaita,Distrotech/gtk2,Lyude/gtk-,bratsche/gtk-,jigpu/gtk,bratsche/gtk-,grubersjoe/adwaita,ebassi/gtk,jessevdk/gtk,ahodesuka/gtk,chergert/gtk,Adamovskiy/gtk,chergert/gtk,grubersjoe/adwaita,ebassi/gtk,alexlarsson/gtk,jadahl/gtk,Sidnioulz/SandboxGtk,alexlarsson/gtk,jigpu/gtk,davidgumberg/gtk,Lyude/gtk-,alexlarsson/gtk,ebassi/gtk,davidt/gtk,jadahl/gtk,Lyude/gtk-,bratsche/gtk-,jadahl/gtk,davidgumberg/gtk,Distrotech/gtk2,Adamovskiy/gtk,davidt/gtk,msteinert/gtk,jessevdk/gtk,Distrotech/gtk2,ebassi/gtk,Sidnioulz/SandboxGtk,Lyude/gtk-,msteinert/gtk,Lyude/gtk-,chergert/gtk,jigpu/gtk,jadahl/gtk,ahodesuka/gtk,grubersjoe/adwaita,ahodesuka/gtk,grubersjoe/adwaita,ahodesuka/gtk,jadahl/gtk,Sidnioulz/SandboxGtk,ebassi/gtk,ahodesuka/gtk,jigpu/gtk,Lyude/gtk-,davidt/gtk,alexlarsson/gtk,bratsche/gtk-,grubersjoe/adwaita,jadahl/gtk,ahodesuka/gtk,Lyude/gtk-,ahodesuka/gtk,Distrotech/gtk2,jessevdk/gtk,grubersjoe/adwaita,jessevdk/gtk,msteinert/gtk,jadahl/gtk,alexlarsson/gtk,davidgumberg/gtk,Adamovskiy/gtk,jigpu/gtk,Adamovskiy/gtk,jessevdk/gtk,davidgumberg/gtk,jigpu/gtk,jigpu/gtk,davidgumberg/gtk