mirror of
https://github.com/rustdesk/rustdesk
synced 2026-05-24 09:28:23 +00:00
avoid invalid texture width and height
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
parent
6734dd01c9
commit
d19d4aacdb
1 changed files with 5 additions and 1 deletions
|
|
@ -371,7 +371,11 @@ class FfiModel with ChangeNotifier {
|
|||
|
||||
_updateSessionWidthHeight(String id) {
|
||||
parent.target?.canvasModel.updateViewStyle();
|
||||
bind.sessionSetSize(id: id, width: display.width, height: display.height);
|
||||
if (display.width < 0 || display.height < 0) {
|
||||
debugPrintStack(label: 'invalid display size (${display.width},${display.height})');
|
||||
} else {
|
||||
bind.sessionSetSize(id: id, width: display.width, height: display.height);
|
||||
}
|
||||
}
|
||||
|
||||
/// Handle the peer info event based on [evt].
|
||||
|
|
|
|||
Loading…
Reference in a new issue