From the description for GetWindowSurface:
This surface will be invalidated if the window is resized. After resizing a window this function must be called again to return a valid surface.
Must I keep track of this myself, i.e. have a list of all surfaces obtained this way attached to the window, or can I detect that the surface is invalid?
Or is this a theoretical question, as such a surface should only be used within a short context (one function), and the pointer then forgotten, and better obtained a fresh one if needed again?
What happens if a such an invalid surface is used?
(I am just learning how to use SDL)