gtk: fix Application to be more robust when embedding mono
When embedding mono, Environment.GetCommandLineArgs() would not return an array with any element. Reported in the mailing list, by Vardar Sahin.
This commit is contained in:
parent
0d781f485f
commit
53e884dd22
1 changed files with 3 additions and 1 deletions
|
@ -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 ()
|
||||
|
|
Loading…
Add table
Reference in a new issue