pgui: prevent error when rendering in offscreen mode

Fixes #1174
This commit is contained in:
rdb 2021-08-11 09:19:03 +02:00
parent 20e081482f
commit 8ad4234df8

View File

@ -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);
}
}