mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2025-03-01 09:26:53 +00:00
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
|
@ -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…
Reference in a new issue