Revision: 6551
          http://playerstage.svn.sourceforge.net/playerstage/?rev=6551&view=rev
Author:   alexcb
Date:     2008-06-12 16:35:17 -0700 (Thu, 12 Jun 2008)

Log Message:
-----------
fixed bug that crashes when STAGEPATH not found

Modified Paths:
--------------
    code/stage/trunk/libstage/file_manager.cc

Modified: code/stage/trunk/libstage/file_manager.cc
===================================================================
--- code/stage/trunk/libstage/file_manager.cc   2008-06-12 23:05:53 UTC (rev 
6550)
+++ code/stage/trunk/libstage/file_manager.cc   2008-06-12 23:35:17 UTC (rev 
6551)
@@ -4,15 +4,17 @@
 namespace Stg
 {
        FileManager::FileManager() {
+               char *tmp;
+               
                SharePath = INSTALL_PREFIX "/share/stage";
                AssetPath = SharePath + '/' + "assets";
-               CtrlPath = getenv("STAGEPATH");
                WorldsRoot = ".";
                
                paths.push_back( "." );
                paths.push_back( SharePath );
                paths.push_back( AssetPath );
-               paths.push_back( CtrlPath );
+               if( tmp = getenv("STAGEPATH") )
+                       paths.push_back( tmp );
        }
 
        std::string FileManager::fullPath( std::string filename ) {


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to