Fix several classes not accepting disposed bitmaps
Fixes an error in Alpha Kimori.
This commit is contained in:
		
							parent
							
								
									685f8b63b3
								
							
						
					
					
						commit
						11cfe887c2
					
				
					 3 changed files with 6 additions and 3 deletions
				
			
		| 
						 | 
					@ -332,7 +332,7 @@ void Sprite::setBitmap(Bitmap *bitmap)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	p->bitmap = bitmap;
 | 
						p->bitmap = bitmap;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (!bitmap)
 | 
						if (nullOrDisposed(bitmap))
 | 
				
			||||||
		return;
 | 
							return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	bitmap->ensureNonMega();
 | 
						bitmap->ensureNonMega();
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -727,7 +727,7 @@ void Window::setWindowskin(Bitmap *value)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	p->windowskin = value;
 | 
						p->windowskin = value;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (!value)
 | 
						if (nullOrDisposed(value))
 | 
				
			||||||
		return;
 | 
							return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	value->ensureNonMega();
 | 
						value->ensureNonMega();
 | 
				
			||||||
| 
						 | 
					@ -743,7 +743,7 @@ void Window::setContents(Bitmap *value)
 | 
				
			||||||
	p->contents = value;
 | 
						p->contents = value;
 | 
				
			||||||
	p->controlsVertDirty = true;
 | 
						p->controlsVertDirty = true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (!value)
 | 
						if (nullOrDisposed(value))
 | 
				
			||||||
		return;
 | 
							return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	value->ensureNonMega();
 | 
						value->ensureNonMega();
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -921,6 +921,9 @@ void WindowVX::setContents(Bitmap *value)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	p->contents = value;
 | 
						p->contents = value;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (nullOrDisposed(value))
 | 
				
			||||||
 | 
							return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	FloatRect rect = p->contents->rect();
 | 
						FloatRect rect = p->contents->rect();
 | 
				
			||||||
	p->contentsQuad.setTexPosRect(rect, rect);
 | 
						p->contentsQuad.setTexPosRect(rect, rect);
 | 
				
			||||||
	p->ctrlVertDirty = true;
 | 
						p->ctrlVertDirty = true;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue