commit | fb4e256d497df573ee5748d0316aece38a1f6919 | [log] [tgz] |
---|---|---|
author | sergeyu@chromium.org <sergeyu@chromium.org@4adac7df-926f-26a2-2b94-8c16560cd09d> | Thu Jan 16 04:45:35 2014 |
committer | sergeyu@chromium.org <sergeyu@chromium.org@4adac7df-926f-26a2-2b94-8c16560cd09d> | Thu Jan 16 04:45:35 2014 |
tree | b925ef5094e4e07b8f108a045eb40bac12dfc15a | |
parent | 8f35afab8cd4a860d3fc6962fd87e440f39e7245 [diff] |
Fix crash in MouseCursor::CopyOf() This issue was causing test failures with the latest webrtc roll. R=mallinath@webrtc.org Review URL: https://webrtc-codereview.appspot.com/7249005 git-svn-id: http://webrtc.googlecode.com/svn/trunk@5392 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/webrtc/modules/desktop_capture/mouse_cursor.cc b/webrtc/modules/desktop_capture/mouse_cursor.cc index c6c58d8..07c89f0 100644 --- a/webrtc/modules/desktop_capture/mouse_cursor.cc +++ b/webrtc/modules/desktop_capture/mouse_cursor.cc
@@ -27,9 +27,10 @@ // static MouseCursor* MouseCursor::CopyOf(const MouseCursor& cursor) { - return new MouseCursor( - cursor.image() ? NULL : BasicDesktopFrame::CopyOf(*cursor.image()), - cursor.hotspot()); + return cursor.image() + ? new MouseCursor(BasicDesktopFrame::CopyOf(*cursor.image()), + cursor.hotspot()) + : new MouseCursor(); } } // namespace webrtc