| Index: ui/views/view_text_utils.cc
|
| diff --git a/ui/views/view_text_utils.cc b/ui/views/view_text_utils.cc
|
| index 0ea27d7624d9c35c09ab5a3af10e7197caa12e98..cdc26293da99ce4ad32eca2dab0954462a6958f4 100644
|
| --- a/ui/views/view_text_utils.cc
|
| +++ b/ui/views/view_text_utils.cc
|
| @@ -26,7 +26,7 @@ void DrawTextAndPositionUrl(gfx::Canvas* canvas,
|
| bool text_direction_is_rtl,
|
| const gfx::Rect& bounds,
|
| const gfx::Font& font) {
|
| - DCHECK(canvas && position);
|
| + DCHECK(position);
|
|
|
| // The |text| parameter is potentially a mix of LTR and RTL "runs," where
|
| // a run is a sequence of words that share the same directionality. We
|
| @@ -128,8 +128,10 @@ void DrawTextStartingFrom(gfx::Canvas* canvas,
|
| int y = position->height() + bounds.y();
|
|
|
| // Draw the text on the screen (mirrored, if RTL run).
|
| - canvas->DrawStringInt(word, font, label->enabled_color(), x, y, w,
|
| - font.GetHeight(), flags);
|
| + if (canvas) {
|
| + canvas->DrawStringInt(word, font, label->enabled_color(), x, y, w,
|
| + font.GetHeight(), flags);
|
| + }
|
|
|
| if (!word.empty() && word[word.size() - 1] == '\x0a') {
|
| // When we come across '\n', we move to the beginning of the next line.
|
|
|