Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: ui/base/cursor/cursor_x11.cc

Issue 10928154: Fix incorrect use of UnrefCustomCursor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: check if platform_cursor_ is non-zero in {Ref/Unref}CustomCursor. Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/base/cursor/cursor.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/base/cursor/cursor.h" 5 #include "ui/base/cursor/cursor.h"
6 6
7 #include "ui/base/x/x11_util.h" 7 #include "ui/base/x/x11_util.h"
8 8
9 namespace ui { 9 namespace ui {
10 10
11 void Cursor::RefCustomCursor() { 11 void Cursor::RefCustomCursor() {
12 ui::RefCustomXCursor(platform_cursor_); 12 if (platform_cursor_)
13 ui::RefCustomXCursor(platform_cursor_);
sadrul 2012/09/12 19:46:56 Do you know where Ref/Unref is getting called but
mazda 2012/09/12 19:56:43 That's the following lines in webkit/glue/webcurso
13 } 14 }
14 15
15 void Cursor::UnrefCustomCursor() { 16 void Cursor::UnrefCustomCursor() {
16 ui::UnrefCustomXCursor(platform_cursor_); 17 if (platform_cursor_)
18 ui::UnrefCustomXCursor(platform_cursor_);
17 } 19 }
18 20
19 } // namespace ui 21 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/cursor/cursor.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698