X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Ftext-run-container.h;h=5af8c558f00b5dde7a38247bc4de040596e2a18d;hp=ecac39da740fa754689aa614da6fb7a53f0b1520;hb=d1a4fa773b183f8dc37e2ea01f94355ee278c3ff;hpb=269ef791ecea99b85d6241ad8e39769e1db312b3 diff --git a/dali-toolkit/internal/text/text-run-container.h b/dali-toolkit/internal/text/text-run-container.h index ecac39d..5af8c55 100644 --- a/dali-toolkit/internal/text/text-run-container.h +++ b/dali-toolkit/internal/text/text-run-container.h @@ -1,8 +1,8 @@ -#ifndef __DALI_TOOLKIT_TEXT_RUN_CONTAINER_H__ -#define __DALI_TOOLKIT_TEXT_RUN_CONTAINER_H__ +#ifndef DALI_TOOLKIT_TEXT_RUN_CONTAINER_H +#define DALI_TOOLKIT_TEXT_RUN_CONTAINER_H /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Copyright (c) 2019 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -178,6 +178,9 @@ void UpdateCharacterRuns( CharacterIndex index, { T& run = *it; + if (run.characterRun.numberOfCharacters == 0) + continue; + const CharacterIndex lastRunIndex = run.characterRun.characterIndex + run.characterRun.numberOfCharacters - 1u; if( lastRunIndex < index ) @@ -240,6 +243,9 @@ void UpdateCharacterRuns( CharacterIndex index, { T& run = *it; + if (run.characterRun.numberOfCharacters == 0) + continue; + // Update the number of characters of the style run. if( ( 0u == index ) && ( 0u == run.characterRun.characterIndex ) ) @@ -353,4 +359,4 @@ void ClearGlyphRuns( GlyphIndex startIndex, } // namespace Dali -#endif // __DALI_TOOLKIT_TEXT_RUN_CONTAINER_H__ +#endif // DALI_TOOLKIT_TEXT_RUN_CONTAINER_H