Skip to content

Commit

Permalink
Compare pointers with nullptr, not false
Browse files Browse the repository at this point in the history
  • Loading branch information
AMDmi3 authored and abau committed Mar 12, 2016
1 parent e739ee5 commit d05fc45
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/src/opengl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ namespace OpenGL {

void initializeFunctions () {
fun = QOpenGLContext::currentContext ()->versionFunctions <QOpenGLFunctions_2_1> ();
if (fun == false) {
if (fun == nullptr) {
DILAY_PANIC ("could not obtain OpenGL 2.1 context")
}
fun->initializeOpenGLFunctions ();

if (OpenGL::supportsGeometryShader ()) {
gsFun = std::make_unique <QOpenGLExtension_EXT_geometry_shader4> ();
if (gsFun == false) {
if (gsFun == nullptr) {
DILAY_PANIC ("could not initialize GL_EXT_geometry_shader4 extension")
}
gsFun->initializeOpenGLFunctions ();
Expand Down

0 comments on commit d05fc45

Please sign in to comment.