mirror of
https://github.com/Armored-Dragon/overte.git
synced 2025-03-11 16:13:16 +01:00
Add error checking, fail sanely if image can't be found
This commit is contained in:
parent
f10fdc5b02
commit
b231c1c954
1 changed files with 4 additions and 0 deletions
|
@ -80,6 +80,10 @@ void KtxTests::testKtxSerialization() {
|
|||
std::atomic<bool> abortSignal;
|
||||
gpu::TexturePointer testTexture =
|
||||
image::TextureUsage::process2DTextureColorFromImage(std::move(image), TEST_IMAGE.toStdString(), true, gpu::BackendTarget::GL45, true, abortSignal);
|
||||
if (!testTexture) {
|
||||
qWarning() << "Failed to process2DTextureColorFromImage:" << TEST_IMAGE;
|
||||
QFAIL("Failed to process2DTextureColorFromImage");
|
||||
}
|
||||
auto ktxMemory = gpu::Texture::serialize(*testTexture, glm::ivec2(testTexture->getWidth(), testTexture->getHeight()));
|
||||
QVERIFY(ktxMemory.get());
|
||||
|
||||
|
|
Loading…
Reference in a new issue