From 8ad4234df8ac90131fadc161545c3ad159760c77 Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 11 Aug 2021 09:19:03 +0200 Subject: [PATCH] pgui: prevent error when rendering in offscreen mode Fixes #1174 --- panda/src/pgui/pgTop.I | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/panda/src/pgui/pgTop.I b/panda/src/pgui/pgTop.I index 775e8cf827..24823b577b 100644 --- a/panda/src/pgui/pgTop.I +++ b/panda/src/pgui/pgTop.I @@ -74,6 +74,7 @@ get_start_sort() const { */ INLINE void PGTop:: add_region(MouseWatcherRegion *region) { - nassertv(_watcher_group != nullptr); - _watcher_group->add_region(region); + if (_watcher_group != nullptr) { + _watcher_group->add_region(region); + } }