summaryrefslogtreecommitdiffstats
path: root/o3d
diff options
context:
space:
mode:
authortschmelcher@google.com <tschmelcher@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-09 01:00:15 +0000
committertschmelcher@google.com <tschmelcher@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-09 01:00:15 +0000
commitc9963bdcf0c56a2cc83169095d3f59dff45b72d0 (patch)
treec46f008e0321d045bd8f60bc2e521dee2054ee0e /o3d
parente848ec764000bd751d7ce3078a125c7580ef672d (diff)
downloadchromium_src-c9963bdcf0c56a2cc83169095d3f59dff45b72d0.zip
chromium_src-c9963bdcf0c56a2cc83169095d3f59dff45b72d0.tar.gz
chromium_src-c9963bdcf0c56a2cc83169095d3f59dff45b72d0.tar.bz2
O2D Mac: Don't crash if the user tries to go to fullscreen with O2D.
TEST=tried to go fullscreen with O2D on Mac in FF, Chrome, and Sarafi and verified nothing happens BUG=none Review URL: http://codereview.chromium.org/6650012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77389 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d')
-rw-r--r--o3d/plugin/mac/plugin_mac.mm6
1 files changed, 6 insertions, 0 deletions
diff --git a/o3d/plugin/mac/plugin_mac.mm b/o3d/plugin/mac/plugin_mac.mm
index 199a061..8bd414a 100644
--- a/o3d/plugin/mac/plugin_mac.mm
+++ b/o3d/plugin/mac/plugin_mac.mm
@@ -554,6 +554,12 @@ bool PluginObject::RequestFullscreenDisplay() {
FullscreenWindowMac* fullscreen_window =
FullscreenWindowMac::Create(this, target_width, target_height);
+ if (!fullscreen_window) {
+ if (was_offscreen_) {
+ EnableOffscreenRendering();
+ }
+ return false;
+ }
SetFullscreenMacWindow(fullscreen_window);
Rect bounds = o3d::CGRect2Rect(fullscreen_window->GetWindowBounds());