mirror of
https://github.com/Ellpeck/MLEM.git
synced 2024-11-22 12:58:33 +01:00
sanity check for panel render target size
This commit is contained in:
parent
62c8b7766c
commit
c7de0322b0
1 changed files with 2 additions and 0 deletions
|
@ -213,6 +213,8 @@ namespace MLEM.Ui.Elements {
|
|||
|
||||
// update the render target
|
||||
var targetArea = (Rectangle) this.GetRenderTargetArea();
|
||||
if (targetArea.Width <= 0 || targetArea.Height <= 0)
|
||||
return;
|
||||
if (this.renderTarget == null || targetArea.Width != this.renderTarget.Width || targetArea.Height != this.renderTarget.Height) {
|
||||
if (this.renderTarget != null)
|
||||
this.renderTarget.Dispose();
|
||||
|
|
Loading…
Reference in a new issue