Add assertion to prevent invalid use of FrameRateMeter

This commit is contained in:
rdb 2015-05-02 22:07:03 +02:00
parent 74f936115e
commit 11350334d0
1 changed files with 4 additions and 0 deletions

View File

@ -180,6 +180,10 @@ clear_window() {
////////////////////////////////////////////////////////////////////
bool FrameRateMeter::
cull_callback(CullTraverser *trav, CullTraverserData &data) {
// This triggers when you try to parent a frame rate meter into
// the scene graph yourself. Instead, use setup_window().
nassertr(_display_region != NULL, false);
Thread *current_thread = trav->get_current_thread();
// Statistics