From 9e2ec85420c9155478bca051141f942291881a4e Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 22 Apr 2010 10:13:05 +0000 Subject: [PATCH] From Tim Moore, added check to whether validConfigs is empty. --- examples/osgfpdepth/osgfpdepth.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/examples/osgfpdepth/osgfpdepth.cpp b/examples/osgfpdepth/osgfpdepth.cpp index 1bf22b9c6..dd480bbc3 100644 --- a/examples/osgfpdepth/osgfpdepth.cpp +++ b/examples/osgfpdepth/osgfpdepth.cpp @@ -821,6 +821,11 @@ GraphicsContext* setupGC(osgViewer::Viewer& viewer, ArgumentParser& arguments) } } } + if (validConfigs.empty()) + { + cout << "no valid frame buffer configurations!\n"; + return 0; + } cout << "valid frame buffer configurations:\n"; for (vector::iterator itr = validConfigs.begin(), end = validConfigs.end();