From d149ceef4a3549ddd2a3267ec160bab1d9f939e8 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 4 Jul 2013 10:40:57 +0200 Subject: [PATCH] VPATH resolution: don't crash when $(FOO) expands to nothing Task-number: QTBUG-29988 Change-Id: Ice3dc28002fc70e70fecc5d61bd0b32260ac0d50 Reviewed-by: Joerg Bornemann --- qmake/generators/makefile.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index d095bdf83df..f65f98f42ba 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -317,6 +317,10 @@ MakefileGenerator::findFilesInVPATH(ProStringList l, uchar flags, const QString if(!val.isEmpty()) { QString qval = val.toQString(); QString file = fixEnvVariables(qval); + if (file.isEmpty()) { + ++val_it; + continue; + } if(!(flags & VPATH_NoFixify)) file = fileFixify(file, qmake_getpwd(), Option::output_dir); if (file.at(0) == '\"' && file.at(file.length() - 1) == '\"')