From 74f6074ec15f808482739c615f80243d0f32bef7 Mon Sep 17 00:00:00 2001 From: "sergeyu@chromium.org" Date: Wed, 9 Apr 2014 01:04:22 +0000 Subject: [PATCH] Fix DesktopSize::is_empty() for the case when only width or only height is 0. BUG=crbug.com/358909 R=wez@chromium.org Review URL: https://webrtc-codereview.appspot.com/11479004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@5867 4adac7df-926f-26a2-2b94-8c16560cd09d --- webrtc/modules/desktop_capture/desktop_geometry.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webrtc/modules/desktop_capture/desktop_geometry.h b/webrtc/modules/desktop_capture/desktop_geometry.h index e51273d8d2..b469d3b2fe 100644 --- a/webrtc/modules/desktop_capture/desktop_geometry.h +++ b/webrtc/modules/desktop_capture/desktop_geometry.h @@ -58,7 +58,7 @@ class DesktopSize { int32_t width() const { return width_; } int32_t height() const { return height_; } - bool is_empty() const { return width_ <= 0 && height_ <= 0; } + bool is_empty() const { return width_ <= 0 || height_ <= 0; } bool equals(const DesktopSize& other) const { return width_ == other.width_ && height_ == other.height_;