|
@@ -8289,7 +8289,9 @@ var BABYLON;
|
|
|
Engine.prototype.restoreDefaultFramebuffer = function () {
|
|
|
this._currentRenderTarget = null;
|
|
|
this.bindUnboundFramebuffer(null);
|
|
|
- this.setViewport(this._cachedViewport);
|
|
|
+ if (this._cachedViewport) {
|
|
|
+ this.setViewport(this._cachedViewport);
|
|
|
+ }
|
|
|
this.wipeCaches();
|
|
|
};
|
|
|
// UBOs
|