pingus-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pingus-CVS] r2775 - branches/pingus_sdl/src


From: jave27
Subject: [Pingus-CVS] r2775 - branches/pingus_sdl/src
Date: Thu, 2 Aug 2007 07:52:00 +0200

Author: jave27
Date: 2007-08-02 07:51:57 +0200 (Thu, 02 Aug 2007)
New Revision: 2775

Modified:
   branches/pingus_sdl/src/pingus_main.cpp
Log:
Wait to initialize PHYSFS until the data directories have been created.

Fixes crash on first launch if ~/.pingus does not exist in Linux.



Modified: branches/pingus_sdl/src/pingus_main.cpp
===================================================================
--- branches/pingus_sdl/src/pingus_main.cpp     2007-08-02 05:50:59 UTC (rev 
2774)
+++ branches/pingus_sdl/src/pingus_main.cpp     2007-08-02 05:51:57 UTC (rev 
2775)
@@ -775,12 +775,6 @@
 int
 PingusMain::main(int argc, char** argv)
 {
-  PHYSFS_init(argv[0]);
-  PHYSFS_addToSearchPath("data", 0);
-  PHYSFS_addToSearchPath(".", 0);
-  PHYSFS_addToSearchPath(System::get_statdir().c_str(), 0);
-  PHYSFS_setWriteDir(System::get_statdir().c_str());
-
   executable_name = argv[0];
 
   // Register the segfault_handler
@@ -801,6 +795,12 @@
     {
       init_path_finder();
 
+      PHYSFS_init(argv[0]);
+      PHYSFS_addToSearchPath("data", 0);
+      PHYSFS_addToSearchPath(".", 0);
+      PHYSFS_addToSearchPath(System::get_statdir().c_str(), 0);
+      PHYSFS_setWriteDir(System::get_statdir().c_str());
+
       quick_check_args(argc, argv);
       read_rc_file();
       check_args(argc, argv);





reply via email to

[Prev in Thread] Current Thread [Next in Thread]