summaryrefslogtreecommitdiffstats
path: root/Source/cmQtAutoMocUic.cxx
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2019-08-27 12:12:46 (GMT)
committerBrad King <brad.king@kitware.com>2019-08-27 14:17:33 (GMT)
commite32f70036cd53b7a7f98b59920dcb5577dad7ec2 (patch)
tree2029ec5a0a61541c2ac041b5735c36f5eb813bc9 /Source/cmQtAutoMocUic.cxx
parent40bbe50e23c06232ccf1c49589dde5dd84e1ac31 (diff)
downloadCMake-e32f70036cd53b7a7f98b59920dcb5577dad7ec2.zip
CMake-e32f70036cd53b7a7f98b59920dcb5577dad7ec2.tar.gz
CMake-e32f70036cd53b7a7f98b59920dcb5577dad7ec2.tar.bz2
Autogen: Fix AUTOUIC segfault, when file includes colliding ui_*.h file
This fixes a case of use after move of a `std::shared_ptr` in `AUTOUIC`. It triggered a segfault, when the error message for colliding `ui_*.h` includes in different files was computed.
Diffstat (limited to 'Source/cmQtAutoMocUic.cxx')
-rw-r--r--Source/cmQtAutoMocUic.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmQtAutoMocUic.cxx b/Source/cmQtAutoMocUic.cxx
index 889f47d..641d8aa 100644
--- a/Source/cmQtAutoMocUic.cxx
+++ b/Source/cmQtAutoMocUic.cxx
@@ -982,7 +982,7 @@ bool cmQtAutoMocUic::JobEvaluateT::UicEval(SourceFileMapT const& fileMap)
}
bool cmQtAutoMocUic::JobEvaluateT::UicEvalFile(
- SourceFileHandleT sourceFileHandle)
+ SourceFileHandleT const& sourceFileHandle)
{
SourceFileT const& sourceFile = *sourceFileHandle;
auto const& Include = sourceFile.ParseData->Uic.Include;
@@ -1000,7 +1000,7 @@ bool cmQtAutoMocUic::JobEvaluateT::UicEvalFile(
}
// Register mapping
if (!UicRegisterMapping(incKey.Key, std::move(uiFileHandle),
- std::move(sourceFileHandle))) {
+ sourceFileHandle)) {
return false;
}
}