Looking at the definition of GetRGBACharPixelData
:
virtual unsigned char *GetPixelData(int x,int y,int x2,int y2,int front);
You can see that it takes the index of the top-right angle (x2, y2), not the size of the subimage.
Hence what you want is:
pixel *pixels = this->window_->GetRGBACharPixelData(0, 0, this->w_ - 1, this->h_ - 1, true);
^^^^ ^^^^