From 984fcdd53628c40a80d6da5b32da42bec8ffe528 Mon Sep 17 00:00:00 2001 From: dooglus Date: Mon, 25 Feb 2008 23:27:08 +0000 Subject: [PATCH] Studio was crashing on Windows if built with debug enabled when trying to recover a file which hadn't yet been saved at all. git-svn-id: http://svn.voria.com/code@1817 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-studio/trunk/src/gtkmm/app.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/synfig-studio/trunk/src/gtkmm/app.cpp b/synfig-studio/trunk/src/gtkmm/app.cpp index 1e4c3a1..e9dcbb2 100644 --- a/synfig-studio/trunk/src/gtkmm/app.cpp +++ b/synfig-studio/trunk/src/gtkmm/app.cpp @@ -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 -- 2.7.4