Fix crash described in 14370 (issue comment)

The crash occurs because
PartDesignGui::TaskDressUpParameters::setSelection was invoked with
nullptr.
This commit is contained in:
xtemp09
2024-06-16 22:09:06 +07:00
committed by Chris Hennes
parent 8365c060a8
commit 2248fc7adb

View File

@@ -257,6 +257,11 @@ void TaskDressUpParameters::setSelection(QListWidgetItem* current) {
// executed when the user selected an item in the list (but double-clicked it)
// highlights the currently selected item
if (current == nullptr){
setSelectionMode(none);
return;
}
if (!wasDoubleClicked) {
// we treat it as single-click event once the QApplication double-click time is passed
QTimer::singleShot(QApplication::doubleClickInterval(), this, &TaskDressUpParameters::itemClickedTimeout);