Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuSanka <yusanka@gmail.com>2020-12-22 12:42:47 +0300
committerYuSanka <yusanka@gmail.com>2020-12-22 12:42:47 +0300
commit6c399052c6d7b2fca4612fe935d73907527edee9 (patch)
treee2f46d7d5da5df0ab428ef5970635f62e0427169 /src/slic3r/GUI/GUI_ObjectList.cpp
parentea327c2d8cfd430dd301543400453003561af251 (diff)
Fixed a crash on copy/paste, when ObjectList has no selection. Related to #5517
Diffstat (limited to 'src/slic3r/GUI/GUI_ObjectList.cpp')
-rw-r--r--src/slic3r/GUI/GUI_ObjectList.cpp2
1 files changed, 2 insertions, 0 deletions
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();