PVS V506: using pointer to deallocated stack space
Change-Id: I43f7d0208f7d644d6f4274a9a718773f7a1346a0 Reviewed-on: https://review.haiku-os.org/c/1600 Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
This commit is contained in:
parent
11cba1646d
commit
1ec8732c71
@ -5676,9 +5676,12 @@ void
|
||||
BTextView::_ApplyStyleRange(int32 fromOffset, int32 toOffset, uint32 mode,
|
||||
const BFont* font, const rgb_color* color, bool syncNullStyle)
|
||||
{
|
||||
BFont normalized;
|
||||
// Declared before the if so it stays allocated until the call to
|
||||
// SetStyleRange
|
||||
if (font != NULL) {
|
||||
// if a font has been given, normalize it
|
||||
BFont normalized = *font;
|
||||
normalized = *font;
|
||||
_NormalizeFont(&normalized);
|
||||
font = &normalized;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user