Error: That operation is not supported

What does it means?
I’m having that error when try to render a text with my render_text function. This function just call SDL_CreateRGBSurface and afetr some operations converts it to SDL_Texture. Thefunction return a texture but with pixels setted to NULL.
Is this a bug? Or does it is in my code? How to debug it?