image saving bug

Hello!

I use of_v0073_vs2010_release. I needed to save fbo to file and wrote such code:

  
  
	finalFbo.allocate(150, 150, GL_RGB);  
	finalFbo.begin();  
		ofClear(255,0,0);  
	finalFbo.end();  
  
	ofPixels pixels;  
	finalFbo.readToPixels(pixels);  
			  
	ofSaveImage(pixels, "test1.png");  
  

When I run this code I have exception

Unhandled exception at 0x7695c41f in imageSaverExample_debug.exe: Microsoft C++ exception: std::bad_alloc at memory location 0x0018f4c4…

If I change finalFbo width and height in allocate to another, e.g. 200x200 all is good and image saves. I have exception when set width or height in range 120-159.

What wrong is with it?

Where are you doing all this? inside the draw function?

I tried it in draw(), update() and setup with similar results