diff --git a/projects/core/src/textures/gryphn_texture.c b/projects/core/src/textures/gryphn_texture.c index 5258778..96b49b4 100644 --- a/projects/core/src/textures/gryphn_texture.c +++ b/projects/core/src/textures/gryphn_texture.c @@ -6,6 +6,7 @@ gnReturnCode gnCreateTexture(gnTexture* texture, gnDevice device, const gnTextur *texture = malloc(sizeof(struct gnTexture_t)); (*texture)->device = device; (*texture)->info = info; + return device->instance->callingLayer->deviceFunctions._gnCreateTexture(*texture, device, info); } @@ -13,5 +14,6 @@ void gnTextureData(gnTextureHandle texture, void* pixelData) { texture->device->instance->callingLayer->deviceFunctions._gnTextureData(texture, pixelData); } void gnDestroyTexture(gnTexture texture) { + if (texture == GN_NULL_HANDLE) return; texture->device->instance->callingLayer->deviceFunctions._gnDestroyTexture(texture); }