--- glib-2.46.2/gio/gapplication.c.orig	2015-12-20 14:58:37.485878800 +0000
+++ glib-2.46.2/gio/gapplication.c	2015-12-20 14:58:53.018351200 +0000
@@ -2256,7 +2256,26 @@
   g_return_val_if_fail (!application->priv->must_quit_now, 1);
 
 #ifdef G_OS_WIN32
-  arguments = g_win32_get_command_line ();
+  {
+    gint new_argc = 0;
+    arguments = g_win32_get_command_line ();
+    /**
+     * If may be the case that something (e.g. Python) dropped arguments
+     * along the way, e.g. C:/msys64/mingw64/bin/python2.exe and not
+     * respecting that will cause havok. This fix assumes dropped arguments
+     * were all leading ones and attempts to drop the same.
+     **/
+    while (arguments[new_argc])
+      {
+        new_argc++;
+      }
+    if (new_argc > argc)
+      {
+        memmove (&arguments[0],
+                 &arguments[new_argc - argc],
+                 sizeof(arguments[0]) * (argc + 1));
+      }
+  }
 #else
   {
     gint i;
