Studio was crashing on Windows if built with debug enabled when trying to recover...
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Mon, 25 Feb 2008 23:27:08 +0000 (23:27 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Mon, 25 Feb 2008 23:27:08 +0000 (23:27 +0000)
git-svn-id: http://svn.voria.com/code@1817 1f10aa63-cdf2-0310-b900-c93c546f37ac

synfig-studio/trunk/src/gtkmm/app.cpp

index 1e4c3a1..e9dcbb2 100644 (file)
@@ -2167,7 +2167,10 @@ App::open_as(std::string filename,std::string as)
 #ifdef WIN32
     char long_name[1024];
     if(GetLongPathName(as.c_str(),long_name,sizeof(long_name)));
-    as=long_name;
+       // when called from autorecover.cpp, filename doesn't exist, and so long_name is empty
+       // don't use it if that's the case
+       if (long_name[0] != '\0')
+               as=long_name;
 #endif
 
        try