Merge pull request #90 from knocte/embedded

gtk: fix Application to be more robust when embedding mono
This commit is contained in:
Bertrand Lorentz 2013-11-09 08:10:06 -08:00
commit d6f06860fb

View File

@ -64,7 +64,9 @@ namespace Gtk {
static void SetPrgname ()
{
GLib.Global.ProgramName = System.IO.Path.GetFileNameWithoutExtension (Environment.GetCommandLineArgs () [0]);
var args = Environment.GetCommandLineArgs ();
if (args != null && args.Length > 0)
GLib.Global.ProgramName = System.IO.Path.GetFileNameWithoutExtension (args [0]);
}
public static void Init ()