From d6a814242bf12a2dd247a4a817745a76dd079219 Mon Sep 17 00:00:00 2001 From: Reino Ruusu Date: Mon, 25 May 2020 13:06:52 +0300 Subject: [PATCH] Eliminated NullPointerException in vtkGizmo.deattachActors(). gitlab #130 Change-Id: I6e4f4e526af083a99d87197fd2c9b90cf119b593 --- .../src/org/simantics/g3d/vtk/gizmo/vtkGizmo.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/gizmo/vtkGizmo.java b/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/gizmo/vtkGizmo.java index 47ee62b4..2c70a68e 100644 --- a/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/gizmo/vtkGizmo.java +++ b/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/gizmo/vtkGizmo.java @@ -74,8 +74,10 @@ public abstract class vtkGizmo implements Gizmo { protected void deattachActors() { view.lock(); vtkRenderer ren1 = view.getRenderer(); - for (vtkProp p : gizmo) { - ren1.RemoveActor(p); + if (ren1 != null) { + for (vtkProp p : gizmo) { + ren1.RemoveActor(p); + } } view.unlock(); } -- 2.47.1