Fix system information crash when OpenGL is not enabled.
[dcpomatic.git] / src / wx / system_information_dialog.cc
index 3a2b3bbf65e7fc1a358677df88c9d683cfc0565e..2630833656a0ee128de2a84f4a90d636a6ee9fee 100644 (file)
@@ -35,7 +35,12 @@ SystemInformationDialog::SystemInformationDialog (wxWindow* parent)
        : TableDialog (parent, _("System information"), 2, 1, false)
 {
        add (_("OpenGL version"), true);
-       add (std_to_wx((char const *) glGetString(GL_VERSION)), false);
+       char const * v = (char const *) glGetString (GL_VERSION);
+       if (v) {
+               add (std_to_wx(v), false);
+       } else {
+               add (_("unknown (OpenGL not enabled in DCP-o-matic)"), false);
+       }
 
        layout ();
 }