]> Pileus Git - grits/blobdiff - src/gis-opengl.c
Avoid executing "configure" until after realize
[grits] / src / gis-opengl.c
index ecbf47a4c140fa457de449051e88eb39696ceb00..9deb0064db89ea9caf7a2ef988f078e9c5c22c37 100644 (file)
@@ -381,6 +381,10 @@ static gboolean on_configure(GisOpenGL *opengl, GdkEventConfigure *event, gpoint
 {
        g_debug("GisOpenGL: on_configure");
 
+       /* wait for "realize" */
+       if (!gdk_gl_context_get_current())
+               return FALSE;
+
        double width  = GTK_WIDGET(opengl)->allocation.width;
        double height = GTK_WIDGET(opengl)->allocation.height;