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

Unified Diff: Source/platform/text/BidiRunList.h

Issue 421383002: Fix loop condition in BidiRunList::replaceRunWithRuns (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: w/test Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/fast/text/bidi-replace-runs-crash-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/text/BidiRunList.h
diff --git a/Source/platform/text/BidiRunList.h b/Source/platform/text/BidiRunList.h
index bfaaab0de9cc576609802973d6cda072e7a29716..53df3d9314ebbd730ff6ae9b5ff1738e70fadfaa 100644
--- a/Source/platform/text/BidiRunList.h
+++ b/Source/platform/text/BidiRunList.h
@@ -153,7 +153,7 @@ void BidiRunList<Run>::replaceRunWithRuns(Run* toReplace, BidiRunList<Run>& newR
} else {
// Find the run just before "toReplace" in the list of runs.
Run* previousRun = m_firstRun;
- while (previousRun->next() != toReplace)
+ while (previousRun->next() && previousRun->next() != toReplace)
previousRun = previousRun->next();
ASSERT(previousRun);
previousRun->setNext(newRuns.firstRun());
« no previous file with comments | « LayoutTests/fast/text/bidi-replace-runs-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698