Skip to content

Commit

Permalink
fix: correct null pointer checks in autoresizing browser views (#26033)
Browse files Browse the repository at this point in the history
* Correction null pointer checks

* fix: correct null pointer checks in autoresizing browser views

Co-authored-by: mlaurencin <mlaurencin@microsoft.com>
  • Loading branch information
trop[bot] and mlaurencin committed Oct 19, 2020
1 parent fd3ce5f commit 7e74f2c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions shell/browser/native_browser_view_views.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ void NativeBrowserViewViews::SetAutoResizeProportions(
if ((auto_resize_flags_ & AutoResizeFlags::kAutoResizeHorizontal) &&
!auto_horizontal_proportion_set_) {
auto* iwc_view = GetInspectableWebContentsView();
if (iwc_view)
if (!iwc_view)
return;
auto* view = iwc_view->GetView();
auto view_bounds = view->bounds();
Expand All @@ -41,7 +41,7 @@ void NativeBrowserViewViews::SetAutoResizeProportions(
if ((auto_resize_flags_ & AutoResizeFlags::kAutoResizeVertical) &&
!auto_vertical_proportion_set_) {
auto* iwc_view = GetInspectableWebContentsView();
if (iwc_view)
if (!iwc_view)
return;
auto* view = iwc_view->GetView();
auto view_bounds = view->bounds();
Expand All @@ -58,7 +58,7 @@ void NativeBrowserViewViews::AutoResize(const gfx::Rect& new_window,
int width_delta,
int height_delta) {
auto* iwc_view = GetInspectableWebContentsView();
if (iwc_view)
if (!iwc_view)
return;
auto* view = iwc_view->GetView();
const auto flags = GetAutoResizeFlags();
Expand Down

0 comments on commit 7e74f2c

Please sign in to comment.