mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-01 09:23:03 -04:00
gracefully handle NULL window
This commit is contained in:
parent
7b6594acac
commit
bb3dd92452
@ -261,6 +261,8 @@ open_window(const WindowProperties &props, GraphicsPipe *pipe,
|
||||
GraphicsWindow *win = wf->open_window(props, &_engine, pipe, gsg);
|
||||
if (win == (GraphicsWindow *)NULL) {
|
||||
// Oops, couldn't make an actual window.
|
||||
framework_cat.error()
|
||||
<< "Unable to create window.\n";
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -115,14 +115,14 @@ open_window(const WindowProperties &props, GraphicsEngine *engine,
|
||||
if (_window != (GraphicsWindow *)NULL) {
|
||||
_window->request_properties(props);
|
||||
set_background_type(_background_type);
|
||||
}
|
||||
|
||||
// Set up a 3-d camera for the window by default.
|
||||
make_camera();
|
||||
// Set up a 3-d camera for the window by default.
|
||||
make_camera();
|
||||
|
||||
if (show_frame_rate_meter) {
|
||||
_frame_rate_meter = new FrameRateMeter("frame_rate_meter");
|
||||
_frame_rate_meter->setup_layer(_window);
|
||||
if (show_frame_rate_meter) {
|
||||
_frame_rate_meter = new FrameRateMeter("frame_rate_meter");
|
||||
_frame_rate_meter->setup_layer(_window);
|
||||
}
|
||||
}
|
||||
|
||||
return _window;
|
||||
|
Loading…
x
Reference in New Issue
Block a user