X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fcore%2Fapplication.cpp;h=aedaa4b6f25c027429f8bff1a5c069078206e7df;hp=1bae2cd68d06c1028c08e8690dbe585c79b6eb9c;hb=d2795b92b02253a36cb7406fbaeabdef6d7caa19;hpb=4f04dc8e2dcb48d524c141cb14ce05b655608454 diff --git a/source/core/application.cpp b/source/core/application.cpp index 1bae2cd..aedaa4b 100644 --- a/source/core/application.cpp +++ b/source/core/application.cpp @@ -90,6 +90,15 @@ void Application::set_startup_info(const char *argv0, void *data) static FS::Path exe; + if(!argv0 || !*argv0) + { +#ifdef _WIN32 + argv0 = "application.exe"; +#else + argv0 = "./application"; +#endif + } + bool has_slash = strchr(argv0, FS::DIRSEP); if(!has_slash) exe = FS::path_lookup(argv0);