Takes in an object from an SDL function and then throws an error if the object is null
Because SDL doesn't throw errors upon failed object creation, but constructs the object as a null, a non-null object means a successful creation
Any null creation means that SDL encountered an error, and this function will throw an SDL error accordingly
Takes in an object from an SDL function and then throws an error if the object is null Because SDL doesn't throw errors upon failed object creation, but constructs the object as a null, a non-null object means a successful creation Any null creation means that SDL encountered an error, and this function will throw an SDL error accordingly