MRI-Binding: Properly init Bitmap in Graphics#snap_to_bitmap
This commit is contained in:
		
							parent
							
								
									b8d861b4cd
								
							
						
					
					
						commit
						b878149f5c
					
				
					 2 changed files with 20 additions and 11 deletions
				
			
		| 
						 | 
				
			
			@ -152,6 +152,8 @@ RB_METHOD(graphicsFadein)
 | 
			
		|||
	return Qnil;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void bitmapInitProps(Bitmap *b, VALUE self);
 | 
			
		||||
 | 
			
		||||
RB_METHOD(graphicsSnapToBitmap)
 | 
			
		||||
{
 | 
			
		||||
	RB_UNUSED_PARAM;
 | 
			
		||||
| 
						 | 
				
			
			@ -159,7 +161,10 @@ RB_METHOD(graphicsSnapToBitmap)
 | 
			
		|||
	Bitmap *result = 0;
 | 
			
		||||
	GUARD_EXC( result = shState->graphics().snapToBitmap(); );
 | 
			
		||||
 | 
			
		||||
	return wrapObject(result, BitmapType);
 | 
			
		||||
	VALUE obj = wrapObject(result, BitmapType);
 | 
			
		||||
	bitmapInitProps(result, obj);
 | 
			
		||||
 | 
			
		||||
	return obj;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue