prevent crash with window-type offscreen

This commit is contained in:
David Rose 2009-03-10 20:12:03 +00:00
parent f65ab84347
commit babf0163e5
2 changed files with 14 additions and 8 deletions

View File

@ -523,11 +523,14 @@ open_buffer() {
// GSG creation/initialization.
if (_gsg == 0) {
_dxgsg = new DXGraphicsStateGuardian8(_engine, _pipe);
_gsg = _dxgsg;
} else {
DCAST_INTO_R(_dxgsg, _gsg, false);
// The code below doesn't support creating a GSG on the fly.
// Just error out for now.
//_dxgsg = new DXGraphicsStateGuardian8(_engine, _pipe);
//_gsg = _dxgsg;
return false;
}
DCAST_INTO_R(_dxgsg, _gsg, false);
if (!save_bitplanes()) {
return false;

View File

@ -745,11 +745,14 @@ open_buffer() {
// GSG creation/initialization.
if (_gsg == 0) {
_dxgsg = new DXGraphicsStateGuardian9(_engine, _pipe);
_gsg = _dxgsg;
} else {
DCAST_INTO_R(_dxgsg, _gsg, false);
// The code below doesn't support creating a GSG on the fly.
// Just error out for now.
//_dxgsg = new DXGraphicsStateGuardian9(_engine, _pipe);
//_gsg = _dxgsg;
return false;
}
DCAST_INTO_R(_dxgsg, _gsg, false);
if (!save_bitplanes()) {
return false;