From 74a55fb8afe07234c705513d324c6cc373e18f8a Mon Sep 17 00:00:00 2001 From: Andy Spencer Date: Thu, 16 Feb 2012 21:24:14 +0000 Subject: [PATCH] Check the roam view before unprojecting On win32 (and maybe others) the motion notify callback can occur before the roam view is properly initialized. --- src/grits-opengl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/grits-opengl.c b/src/grits-opengl.c index 1b2cce9..0b4100a 100644 --- a/src/grits-opengl.c +++ b/src/grits-opengl.c @@ -469,6 +469,8 @@ static void grits_opengl_unproject(GritsViewer *_opengl, gdouble *lat, gdouble *lon, gdouble *elev) { GritsOpenGL *opengl = GRITS_OPENGL(_opengl); + if (!opengl->sphere->view) + return; gdouble x, y, z; if (pz < 0) { gfloat tmp = 0; -- 2.41.0