diff --git a/src/MagnumPlugins/TgaImporter/TgaImporter.cpp b/src/MagnumPlugins/TgaImporter/TgaImporter.cpp index bcddbaba0..e052eceeb 100644 --- a/src/MagnumPlugins/TgaImporter/TgaImporter.cpp +++ b/src/MagnumPlugins/TgaImporter/TgaImporter.cpp @@ -100,7 +100,7 @@ std::optional TgaImporter::doImage2D(UnsignedInt) { /* Grayscale */ } else if(header.imageType == 3) { #if defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL) - format = Context::current() && Context::current().isExtensionSupported() ? + format = Context::hasCurrent() && Context::current().isExtensionSupported() ? PixelFormat::Red : PixelFormat::Luminance; #elif !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)) format = PixelFormat::Red;