mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-19 19:33:47 +00:00
Prevent crash when user deleted object from plater before thumbnail was generated in the other thread. #1207
This commit is contained in:
@@ -159,6 +159,7 @@ sub new {
|
||||
EVT_COMMAND($self, -1, $THUMBNAIL_DONE_EVENT, sub {
|
||||
my ($self, $event) = @_;
|
||||
my ($obj_idx, $thumbnail) = @{$event->GetData};
|
||||
return if !$self->{objects}[$obj_idx]; # object was deleted before thumbnail generation completed
|
||||
$self->{objects}[$obj_idx]->thumbnail($thumbnail->clone);
|
||||
$self->on_thumbnail_made($obj_idx);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user