From f46db00bed2e3617c28b1031d36eb92520e8da06 Mon Sep 17 00:00:00 2001 From: Victor Efimov Date: Sun, 21 Sep 2014 18:19:18 +1100 Subject: [PATCH] Properly initialize platform variable. Didn't compile with some compilers in some modes. --- CLExpr/expr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CLExpr/expr.cpp b/CLExpr/expr.cpp index ee1af3f..78534dc 100644 --- a/CLExpr/expr.cpp +++ b/CLExpr/expr.cpp @@ -259,7 +259,7 @@ ClExpr::ClExpr(PClip clip1, PClip clip2, PClip clip3, cl_device_id device; cl_int last_error; - cl_platform_id platform; + cl_platform_id platform = nullptr; for (cl_uint i = 0; i < platforms_count; ++i) { last_error = clGetDeviceIDs(platforms[i], CL_DEVICE_TYPE_GPU, 1, &device, NULL);