Null check was wrong
@@ -242,7 +242,7 @@ void tex2d_releasesurface(tex2d_t tex) {
void tex2d_set_colors(tex2d_t texture, int32_t width, int32_t height, void **data, int32_t data_count) {
bool dynamic = texture->type & tex_type_dynamic;
bool different_size = texture->width != width || texture->height != height;
- if (!different_size && data == nullptr)
+ if (!different_size && (data == nullptr || *data == nullptr))
return;
if (texture->texture == nullptr || different_size) {
tex2d_releasesurface(texture);
