summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qmake/generators/win32/msvc_vcproj.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp
index 08d34bf..e2315c7 100644
--- a/qmake/generators/win32/msvc_vcproj.cpp
+++ b/qmake/generators/win32/msvc_vcproj.cpp
@@ -763,11 +763,16 @@ void VcprojGenerator::init()
bool VcprojGenerator::mergeBuildProject(MakefileGenerator *other)
{
- VcprojGenerator *otherVC = static_cast<VcprojGenerator*>(other);
- if (!otherVC) {
+ if (!other || !other->projectFile()) {
+ warn_msg(WarnLogic, "VcprojGenerator: Cannot merge null project.");
+ return false;
+ }
+ if (other->projectFile()->first("MAKEFILE_GENERATOR") != "MSVC.NET") {
warn_msg(WarnLogic, "VcprojGenerator: Cannot merge other types of projects! (ignored)");
return false;
}
+
+ VcprojGenerator *otherVC = static_cast<VcprojGenerator*>(other);
mergedProjects += otherVC;
return true;
}