summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-03 01:13:29 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-03 01:13:29 +0000
commit17e551be5c3651ac7bcc280d4a01d0610ee702f3 (patch)
treeee6c6a30e881244da281dbce5bea68683f507aba /chrome
parenta43ed511af1c740d4b9ab34286ce33edd856a0b8 (diff)
downloadchromium_src-17e551be5c3651ac7bcc280d4a01d0610ee702f3.zip
chromium_src-17e551be5c3651ac7bcc280d4a01d0610ee702f3.tar.gz
chromium_src-17e551be5c3651ac7bcc280d4a01d0610ee702f3.tar.bz2
Fix a divide by zero crash with a temporary workaround (until we have themes).
http://crbug.com/6294 Review URL: http://codereview.chromium.org/19767 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9058 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/views/tabs/tab_renderer.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/chrome/browser/views/tabs/tab_renderer.cc b/chrome/browser/views/tabs/tab_renderer.cc
index 640b0e3..e008d0d 100644
--- a/chrome/browser/views/tabs/tab_renderer.cc
+++ b/chrome/browser/views/tabs/tab_renderer.cc
@@ -142,6 +142,12 @@ void InitResources() {
waiting_to_loading_frame_count_ratio =
waiting_animation_frame_count / loading_animation_frame_count;
+ // TODO(beng): eventually remove this when we have a proper themeing system.
+ // themes not supporting IDR_THROBBER_WAITING are causing this
+ // value to be 0 which causes DIV0 crashes. The value of 5
+ // matches the current bitmaps in our source.
+ if (waiting_to_loading_frame_count_ratio == 0)
+ waiting_to_loading_frame_count_ratio = 5;
crashed_fav_icon = rb.GetBitmapNamed(IDR_SAD_FAVICON);