From 7f0dc175909c13c42b987e6ee1ab9fee638df2aa Mon Sep 17 00:00:00 2001 From: Elijah R Date: Sun, 2 Jun 2024 13:11:16 -0400 Subject: [PATCH] prevent invalid size instructions since apparently that can happen --- CollabVMSharp/CollabVMClient.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/CollabVMSharp/CollabVMClient.cs b/CollabVMSharp/CollabVMClient.cs index 0bfec87..5ea5afa 100644 --- a/CollabVMSharp/CollabVMClient.cs +++ b/CollabVMSharp/CollabVMClient.cs @@ -292,6 +292,7 @@ public class CollabVMClient { if (msgArr[1] != "0") return; var width = int.Parse(msgArr[2]); var height = int.Parse(msgArr[3]); + if (width == 0 || height == 0) return; this.framebuffer = new Image(width, height); this.ScreenSize.Invoke(this, new ScreenSizeEventArgs { Width = width, Height = height }); break;