Skip to content

Commit

Permalink
fix crash when project is not yet saved
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Nov 24, 2011
1 parent 376adc4 commit 1717d3c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/core/qgsproject.cpp
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -1365,7 +1365,9 @@ QString QgsProject::readPath( QString src ) const
// where the source file had to exist and only the project directory was stripped
// from the filename.
QFileInfo pfi( fileName() );
Q_ASSERT( pfi.exists() );
if ( !pfi.exists() )
return src;

QFileInfo fi( pfi.canonicalPath() + "/" + src );

if ( !fi.exists() )
Expand Down

0 comments on commit 1717d3c

Please sign in to comment.