mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-24 07:03:59 -06:00
Prevent crash when user deleted object from plater before thumbnail was generated in the other thread. #1207
This commit is contained in:
parent
7a8e1e778a
commit
9ea55497c2
2 changed files with 2 additions and 0 deletions
|
@ -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);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue