diff options
Diffstat (limited to 'cogl/cogl-pipeline-opengl.c')
-rw-r--r-- | cogl/cogl-pipeline-opengl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cogl/cogl-pipeline-opengl.c b/cogl/cogl-pipeline-opengl.c index fc331d0f..d7e74342 100644 --- a/cogl/cogl-pipeline-opengl.c +++ b/cogl/cogl-pipeline-opengl.c @@ -872,9 +872,9 @@ flush_layers_common_gl_state_cb (CoglPipelineLayer *layer, void *user_data) } #endif - cogl_handle_ref (layer); - if (unit->layer != COGL_INVALID_HANDLE) - cogl_handle_unref (unit->layer); + cogl_object_ref (layer); + if (unit->layer != NULL) + cogl_object_unref (unit->layer); unit->layer = layer; unit->layer_changes_since_flush = 0; |