This works around a sporadic crashing bug - I didn't really fixed the bug, just
its symptoms. I guess this piece of code could need some documentation... git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15065 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
ef0635bd49
commit
8e51bdd43f
@ -15,6 +15,8 @@
|
||||
|
||||
#include <View.h>
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
_BStyleRunDescBuffer_::_BStyleRunDescBuffer_()
|
||||
: _BTextViewSupportBuffer_<STEStyleRunDesc>(20)
|
||||
@ -288,9 +290,15 @@ _BStyleBuffer_::SetStyleRange(int32 fromOffset, int32 toOffset,
|
||||
}
|
||||
|
||||
runIndex++;
|
||||
offset = runEnd;
|
||||
if (offset == runEnd) {
|
||||
// TODO: this hides a bug somewhere else in the code that
|
||||
// should probably be fixed...
|
||||
printf("offset == runEnd!\n");
|
||||
break;
|
||||
}
|
||||
offset = runEnd;
|
||||
} while (offset < toOffset);
|
||||
|
||||
|
||||
if (offset == toOffset && runIndex < fStyleRunDesc.ItemCount()
|
||||
&& fStyleRunDesc[runIndex]->index == styleIndex)
|
||||
RemoveStyles(runIndex);
|
||||
|
Loading…
Reference in New Issue
Block a user