Essentially, I am trying to use malloc here but the green line is letting me know I am dereferencing a null pointer here? It seems like a simple error but I don't understand why it is happening.
For context wall is a simple struct, that is a member of the PortalPanic class that looks like this:
class PortalPanic : public MinigameBase
{
public:
struct wall {
int xCord;
int yCord;
int width;
sf::Color color;
sf::RectangleShape wallRect;
};
.
.
.
more class stuff