diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx index 37b8d5aad..4ae2d1fe6 100644 --- a/Source/CPack/cmCPackGenerator.cxx +++ b/Source/CPack/cmCPackGenerator.cxx @@ -345,7 +345,7 @@ int cmCPackGenerator::InstallProjectViaInstalledDirectories( "Cannot find any files in the installed directory" << std::endl); return 0; } - std::vector& files = gl.GetFiles(); + files = gl.GetFiles(); std::vector::iterator gfit; std::vector::iterator regIt; for ( gfit = files.begin(); gfit != files.end(); ++ gfit )