1
0
mirror of https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git synced 2026-07-13 08:24:27 +00:00

Bugfix: prevent the "bad drawable" error when showing the OpenGL canvas. #2015 #2099

This commit is contained in:
Alessandro Ranellucci
2014-06-19 10:27:23 +02:00
parent 41de95fd27
commit 89b2fbbae0
+4 -2
View File
@@ -383,8 +383,10 @@ sub InitGL {
sub Render {
my ($self, $dc) = @_;
return unless $self->GetContext;
# prevent calling SetCurrent() when window is not shown yet
return unless $self->IsShownOnScreen;
return unless my $context = $self->GetContext;
$self->SetCurrent($self->GetContext);
$self->InitGL;