forked from qt-creator/qt-creator
CMakePM: Fix crash with specific CMakePresets.json
The code was not taking into consideration an empty QStringList. Fixes: QTCREATORBUG-30755 Change-Id: Ifb9f5dc3ffefd94d44b16b161bc04d381f3f6786 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -136,6 +136,8 @@ Internal::PresetsData CMakeProject::combinePresets(Internal::PresetsData &cmakeP
|
|||||||
&& left.inherits.value().contains(right.name);
|
&& left.inherits.value().contains(right.name);
|
||||||
|
|
||||||
const bool inheritsGreater = left.inherits && right.inherits
|
const bool inheritsGreater = left.inherits && right.inherits
|
||||||
|
&& !left.inherits.value().isEmpty()
|
||||||
|
&& !right.inherits.value().isEmpty()
|
||||||
&& left.inherits.value().first()
|
&& left.inherits.value().first()
|
||||||
> right.inherits.value().first();
|
> right.inherits.value().first();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user