From 9f7734abeb74298d91864feff77ae11b1d791c43 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Sat, 26 Jul 2014 17:15:47 +0200 Subject: [PATCH] Prevent warnings when zooming on uninitialized 3D canvas --- lib/Slic3r/GUI/PreviewCanvas.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Slic3r/GUI/PreviewCanvas.pm b/lib/Slic3r/GUI/PreviewCanvas.pm index cbc6cbbe4..89967922c 100644 --- a/lib/Slic3r/GUI/PreviewCanvas.pm +++ b/lib/Slic3r/GUI/PreviewCanvas.pm @@ -379,6 +379,7 @@ sub mouse_to_3d { sub ZoomTo { my ($self, $factor, $tox, $toy) = @_; + return if !$self->init; glTranslatef($tox, $toy, 0); glMatrixMode(GL_MODELVIEW); $self->Zoom($factor);