From 6c399052c6d7b2fca4612fe935d73907527edee9 Mon Sep 17 00:00:00 2001 From: YuSanka Date: Tue, 22 Dec 2020 10:42:47 +0100 Subject: Fixed a crash on copy/paste, when ObjectList has no selection. Related to #5517 --- src/slic3r/GUI/GUI_ObjectList.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/slic3r/GUI/GUI_ObjectList.cpp') diff --git a/src/slic3r/GUI/GUI_ObjectList.cpp b/src/slic3r/GUI/GUI_ObjectList.cpp index ed3e9199d..20cb774ee 100644 --- a/src/slic3r/GUI/GUI_ObjectList.cpp +++ b/src/slic3r/GUI/GUI_ObjectList.cpp @@ -1070,6 +1070,8 @@ bool ObjectList::copy_to_clipboard() { wxDataViewItemArray sels; GetSelections(sels); + if (sels.IsEmpty()) + return false; ItemType type = m_objects_model->GetItemType(sels.front()); if (!(type & (itSettings | itLayer | itLayerRoot))) { m_clipboard.reset(); -- cgit v1.2.3