From: Victor Cebollada Date: Thu, 5 May 2016 07:38:17 +0000 (+0100) Subject: Svace issues. X-Git-Tag: dali_1.1.33~2^2 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=11b00660475d484adc5bcf21583eeaebc5a2f57b;hp=--cc Svace issues. * Fixes some text related svace issues. Change-Id: I88f91a0d43981a99f070c800e446066e6deb8874 Signed-off-by: Victor Cebollada --- 11b00660475d484adc5bcf21583eeaebc5a2f57b diff --git a/dali-toolkit/internal/controls/text-controls/text-selection-popup-impl.cpp b/dali-toolkit/internal/controls/text-controls/text-selection-popup-impl.cpp index 51f9a97..1f8302a 100644 --- a/dali-toolkit/internal/controls/text-controls/text-selection-popup-impl.cpp +++ b/dali-toolkit/internal/controls/text-controls/text-selection-popup-impl.cpp @@ -637,12 +637,12 @@ std::string TextSelectionPopup::GetPressedImage() const mOrderListOfButtons.reserve( 8u ); // Create button for each possible option using Option priority - mOrderListOfButtons.push_back( ButtonRequirement( Toolkit::TextSelectionPopup::CUT, mCutOptionPriority, OPTION_CUT, POPUP_CUT_STRING , mCutIconImage, ( mEnabledButtons & Toolkit::TextSelectionPopup::CUT) ) ); - mOrderListOfButtons.push_back( ButtonRequirement( Toolkit::TextSelectionPopup::COPY, mCopyOptionPriority, OPTION_COPY, POPUP_COPY_STRING, mCopyIconImage, ( mEnabledButtons & Toolkit::TextSelectionPopup::COPY) ) ); - mOrderListOfButtons.push_back( ButtonRequirement( Toolkit::TextSelectionPopup::PASTE, mPasteOptionPriority, OPTION_PASTE, POPUP_PASTE_STRING, mPasteIconImage, ( mEnabledButtons & Toolkit::TextSelectionPopup::PASTE) ) ); - mOrderListOfButtons.push_back( ButtonRequirement( Toolkit::TextSelectionPopup::SELECT, mSelectOptionPriority, OPTION_SELECT_WORD, POPUP_SELECT_STRING, mSelectIconImage, ( mEnabledButtons & Toolkit::TextSelectionPopup::SELECT) ) ); - mOrderListOfButtons.push_back( ButtonRequirement( Toolkit::TextSelectionPopup::SELECT_ALL, mSelectAllOptionPriority, OPTION_SELECT_ALL, POPUP_SELECT_ALL_STRING, mSelectAllIconImage, ( mEnabledButtons & Toolkit::TextSelectionPopup::SELECT_ALL) ) ); - mOrderListOfButtons.push_back( ButtonRequirement( Toolkit::TextSelectionPopup::CLIPBOARD, mClipboardOptionPriority, OPTION_CLIPBOARD, POPUP_CLIPBOARD_STRING, mClipboardIconImage, ( mEnabledButtons & Toolkit::TextSelectionPopup::CLIPBOARD) ) ); + mOrderListOfButtons.push_back( ButtonRequirement( Toolkit::TextSelectionPopup::CUT, mCutOptionPriority, OPTION_CUT, POPUP_CUT_STRING , mCutIconImage, 0 != ( mEnabledButtons & Toolkit::TextSelectionPopup::CUT) ) ); + mOrderListOfButtons.push_back( ButtonRequirement( Toolkit::TextSelectionPopup::COPY, mCopyOptionPriority, OPTION_COPY, POPUP_COPY_STRING, mCopyIconImage, 0 != ( mEnabledButtons & Toolkit::TextSelectionPopup::COPY) ) ); + mOrderListOfButtons.push_back( ButtonRequirement( Toolkit::TextSelectionPopup::PASTE, mPasteOptionPriority, OPTION_PASTE, POPUP_PASTE_STRING, mPasteIconImage, 0 != ( mEnabledButtons & Toolkit::TextSelectionPopup::PASTE) ) ); + mOrderListOfButtons.push_back( ButtonRequirement( Toolkit::TextSelectionPopup::SELECT, mSelectOptionPriority, OPTION_SELECT_WORD, POPUP_SELECT_STRING, mSelectIconImage, 0 != ( mEnabledButtons & Toolkit::TextSelectionPopup::SELECT) ) ); + mOrderListOfButtons.push_back( ButtonRequirement( Toolkit::TextSelectionPopup::SELECT_ALL, mSelectAllOptionPriority, OPTION_SELECT_ALL, POPUP_SELECT_ALL_STRING, mSelectAllIconImage, 0 != ( mEnabledButtons & Toolkit::TextSelectionPopup::SELECT_ALL) ) ); + mOrderListOfButtons.push_back( ButtonRequirement( Toolkit::TextSelectionPopup::CLIPBOARD, mClipboardOptionPriority, OPTION_CLIPBOARD, POPUP_CLIPBOARD_STRING, mClipboardIconImage, 0 != ( mEnabledButtons & Toolkit::TextSelectionPopup::CLIPBOARD) ) ); // Sort the buttons according their priorities. std::sort( mOrderListOfButtons.begin(), mOrderListOfButtons.end(), TextSelectionPopup::ButtonPriorityCompare() ); diff --git a/dali-toolkit/internal/text/layouts/layout-engine.cpp b/dali-toolkit/internal/text/layouts/layout-engine.cpp index 4182acd..89b6f5b 100644 --- a/dali-toolkit/internal/text/layouts/layout-engine.cpp +++ b/dali-toolkit/internal/text/layouts/layout-engine.cpp @@ -807,6 +807,7 @@ struct LayoutEngine::Impl { // Need to add a new line with no characters but with height to increase the layoutSize.height LineRun newLine; + Initialize( newLine ); lines.PushBack( newLine ); UpdateTextLayout( layoutParameters, @@ -1193,6 +1194,21 @@ struct LayoutEngine::Impl } } + void Initialize( LineRun& line ) + { + line.glyphRun.glyphIndex = 0u; + line.glyphRun.numberOfGlyphs = 0u; + line.characterRun.characterIndex = 0u; + line.characterRun.numberOfCharacters = 0u; + line.width = 0.f; + line.ascender = 0.f; + line.descender = 0.f; + line.extraLength = 0.f; + line.alignmentOffset = 0.f; + line.direction = !RTL; + line.ellipsis = false; + } + LayoutEngine::Layout mLayout; LayoutEngine::HorizontalAlignment mHorizontalAlignment; LayoutEngine::VerticalAlignment mVerticalAlignment; diff --git a/dali-toolkit/internal/text/markup-processor.cpp b/dali-toolkit/internal/text/markup-processor.cpp index f8ecde3..6ea6352 100644 --- a/dali-toolkit/internal/text/markup-processor.cpp +++ b/dali-toolkit/internal/text/markup-processor.cpp @@ -102,6 +102,28 @@ struct StyleStack }; /** + * @brief Initializes a font run description to its defaults. + * + * @param[in,out] fontRun The font description run to initialize. + */ +void Initialize( FontDescriptionRun& fontRun ) +{ + fontRun.characterRun.characterIndex = 0u; + fontRun.characterRun.numberOfCharacters = 0u; + fontRun.familyName = NULL; + fontRun.familyLength = 0u; + fontRun.weight = TextAbstraction::FontWeight::NORMAL; + fontRun.width = TextAbstraction::FontWidth::NORMAL; + fontRun.slant = TextAbstraction::FontSlant::NORMAL; + fontRun.size = 0u; + fontRun.familyDefined = false; + fontRun.weightDefined = false; + fontRun.widthDefined = false; + fontRun.slantDefined = false; + fontRun.sizeDefined = false; +} + +/** * @brief Splits the tag string into the tag name and its attributes. * * The attributes are stored in a vector in the tag. @@ -399,18 +421,12 @@ void ProcessMarkupString( const std::string& markupString, MarkupProcessData& ma { // Create a new font run. FontDescriptionRun fontRun; - fontRun.characterRun.numberOfCharacters = 0u; + Initialize( fontRun ); // Fill the run with the parameters. fontRun.characterRun.characterIndex = characterIndex; fontRun.slant = TextAbstraction::FontSlant::ITALIC; - - fontRun.familyName = NULL; - fontRun.familyDefined = false; - fontRun.weightDefined = false; - fontRun.widthDefined = false; fontRun.slantDefined = true; - fontRun.sizeDefined = false; // Push the font run in the logical model. markupProcessData.fontRuns.PushBack( fontRun ); @@ -445,19 +461,12 @@ void ProcessMarkupString( const std::string& markupString, MarkupProcessData& ma { // Create a new font run. FontDescriptionRun fontRun; - fontRun.characterRun.numberOfCharacters = 0u; + Initialize( fontRun ); // Fill the run with the parameters. fontRun.characterRun.characterIndex = characterIndex; - fontRun.weight = TextAbstraction::FontWeight::BOLD; - - fontRun.familyName = NULL; - fontRun.familyDefined = false; fontRun.weightDefined = true; - fontRun.widthDefined = false; - fontRun.slantDefined = false; - fontRun.sizeDefined = false; // Push the font run in the logical model. markupProcessData.fontRuns.PushBack( fontRun ); @@ -481,18 +490,11 @@ void ProcessMarkupString( const std::string& markupString, MarkupProcessData& ma { // Create a new font run. FontDescriptionRun fontRun; - fontRun.characterRun.numberOfCharacters = 0u; + Initialize( fontRun ); // Fill the run with the parameters. fontRun.characterRun.characterIndex = characterIndex; - fontRun.familyName = NULL; - fontRun.familyDefined = false; - fontRun.weightDefined = false; - fontRun.widthDefined = false; - fontRun.slantDefined = false; - fontRun.sizeDefined = false; - ProcessFontTag( tag, fontRun ); // Push the font run in the logical model. diff --git a/dali-toolkit/internal/text/text-controller-impl.cpp b/dali-toolkit/internal/text/text-controller-impl.cpp index 813c022..d863268 100644 --- a/dali-toolkit/internal/text/text-controller-impl.cpp +++ b/dali-toolkit/internal/text/text-controller-impl.cpp @@ -300,17 +300,17 @@ void Controller::Impl::CalculateTextUpdateIndices( Length& numberOfCharacters ) } else { - CharacterIndex lastIndex = 0u; + Length numberOfCharactersToUpdate = 0u; if( mTextUpdateInfo.mFullRelayoutNeeded ) { - lastIndex = mTextUpdateInfo.mPreviousNumberOfCharacters; + numberOfCharactersToUpdate = mTextUpdateInfo.mPreviousNumberOfCharacters; } else { - lastIndex = ( mTextUpdateInfo.mNumberOfCharactersToRemove > 0u ) ? mTextUpdateInfo.mNumberOfCharactersToRemove : 1u; + numberOfCharactersToUpdate = ( mTextUpdateInfo.mNumberOfCharactersToRemove > 0u ) ? mTextUpdateInfo.mNumberOfCharactersToRemove : 1u; } mLogicalModel->FindParagraphs( mTextUpdateInfo.mCharacterIndex, - lastIndex, + numberOfCharactersToUpdate, paragraphsToBeUpdated ); } @@ -345,36 +345,36 @@ void Controller::Impl::CalculateTextUpdateIndices( Length& numberOfCharacters ) void Controller::Impl::ClearFullModelData( OperationsMask operations ) { - if( GET_LINE_BREAKS & operations ) + if( NO_OPERATION != ( GET_LINE_BREAKS & operations ) ) { mLogicalModel->mLineBreakInfo.Clear(); mLogicalModel->mParagraphInfo.Clear(); } - if( GET_WORD_BREAKS & operations ) + if( NO_OPERATION != ( GET_WORD_BREAKS & operations ) ) { mLogicalModel->mLineBreakInfo.Clear(); } - if( GET_SCRIPTS & operations ) + if( NO_OPERATION != ( GET_SCRIPTS & operations ) ) { mLogicalModel->mScriptRuns.Clear(); } - if( VALIDATE_FONTS & operations ) + if( NO_OPERATION != ( VALIDATE_FONTS & operations ) ) { mLogicalModel->mFontRuns.Clear(); } if( 0u != mLogicalModel->mBidirectionalParagraphInfo.Count() ) { - if( BIDI_INFO & operations ) + if( NO_OPERATION != ( BIDI_INFO & operations ) ) { mLogicalModel->mBidirectionalParagraphInfo.Clear(); mLogicalModel->mCharacterDirections.Clear(); } - if( REORDER & operations ) + if( NO_OPERATION != ( REORDER & operations ) ) { // Free the allocated memory used to store the conversion table in the bidirectional line info run. for( Vector::Iterator it = mLogicalModel->mBidirectionalLineInfo.Begin(), @@ -391,7 +391,7 @@ void Controller::Impl::ClearFullModelData( OperationsMask operations ) } } - if( SHAPE_TEXT & operations ) + if( NO_OPERATION != ( SHAPE_TEXT & operations ) ) { mVisualModel->mGlyphs.Clear(); mVisualModel->mGlyphsToCharacters.Clear(); @@ -401,12 +401,12 @@ void Controller::Impl::ClearFullModelData( OperationsMask operations ) mVisualModel->mGlyphPositions.Clear(); } - if( LAYOUT & operations ) + if( NO_OPERATION != ( LAYOUT & operations ) ) { mVisualModel->mLines.Clear(); } - if( COLOR & operations ) + if( NO_OPERATION != ( COLOR & operations ) ) { mVisualModel->mColorIndices.Clear(); } @@ -416,7 +416,7 @@ void Controller::Impl::ClearCharacterModelData( CharacterIndex startIndex, Chara { const CharacterIndex endIndexPlusOne = endIndex + 1u; - if( GET_LINE_BREAKS & operations ) + if( NO_OPERATION != ( GET_LINE_BREAKS & operations ) ) { // Clear the line break info. LineBreakInfo* lineBreakInfoBuffer = mLogicalModel->mLineBreakInfo.Begin(); @@ -430,7 +430,7 @@ void Controller::Impl::ClearCharacterModelData( CharacterIndex startIndex, Chara mLogicalModel->mParagraphInfo ); } - if( GET_WORD_BREAKS & operations ) + if( NO_OPERATION != ( GET_WORD_BREAKS & operations ) ) { // Clear the word break info. WordBreakInfo* wordBreakInfoBuffer = mLogicalModel->mWordBreakInfo.Begin(); @@ -439,7 +439,7 @@ void Controller::Impl::ClearCharacterModelData( CharacterIndex startIndex, Chara wordBreakInfoBuffer + endIndexPlusOne ); } - if( GET_SCRIPTS & operations ) + if( NO_OPERATION != ( GET_SCRIPTS & operations ) ) { // Clear the scripts. ClearCharacterRuns( startIndex, @@ -447,7 +447,7 @@ void Controller::Impl::ClearCharacterModelData( CharacterIndex startIndex, Chara mLogicalModel->mScriptRuns ); } - if( VALIDATE_FONTS & operations ) + if( NO_OPERATION != ( VALIDATE_FONTS & operations ) ) { // Clear the fonts. ClearCharacterRuns( startIndex, @@ -457,7 +457,7 @@ void Controller::Impl::ClearCharacterModelData( CharacterIndex startIndex, Chara if( 0u != mLogicalModel->mBidirectionalParagraphInfo.Count() ) { - if( BIDI_INFO & operations ) + if( NO_OPERATION != ( BIDI_INFO & operations ) ) { // Clear the bidirectional paragraph info. ClearCharacterRuns( startIndex, @@ -471,7 +471,7 @@ void Controller::Impl::ClearCharacterModelData( CharacterIndex startIndex, Chara characterDirectionsBuffer + endIndexPlusOne ); } - if( REORDER & operations ) + if( NO_OPERATION != ( REORDER & operations ) ) { uint32_t startRemoveIndex = mLogicalModel->mBidirectionalLineInfo.Count(); uint32_t endRemoveIndex = startRemoveIndex; @@ -513,7 +513,7 @@ void Controller::Impl::ClearGlyphModelData( CharacterIndex startIndex, Character const GlyphIndex endGlyphIndexPlusOne = *( charactersToGlyphBuffer + endIndex ) + *( glyphsPerCharacterBuffer + endIndex ); const Length numberOfGlyphsRemoved = endGlyphIndexPlusOne - mTextUpdateInfo.mStartGlyphIndex; - if( SHAPE_TEXT & operations ) + if( NO_OPERATION != ( SHAPE_TEXT & operations ) ) { // Update the character to glyph indices. for( Vector::Iterator it = charactersToGlyphBuffer + endIndexPlusOne, @@ -565,7 +565,7 @@ void Controller::Impl::ClearGlyphModelData( CharacterIndex startIndex, Character positionsBuffer + endGlyphIndexPlusOne ); } - if( LAYOUT & operations ) + if( NO_OPERATION != ( LAYOUT & operations ) ) { // Clear the lines. uint32_t startRemoveIndex = mVisualModel->mLines.Count(); @@ -593,7 +593,7 @@ void Controller::Impl::ClearGlyphModelData( CharacterIndex startIndex, Character linesBuffer + endRemoveIndex ); } - if( COLOR & operations ) + if( NO_OPERATION != ( COLOR & operations ) ) { if( 0u != mVisualModel->mColorIndices.Count() ) { @@ -666,7 +666,7 @@ bool Controller::Impl::UpdateModel( OperationsMask operationsRequired ) Vector& lineBreakInfo = mLogicalModel->mLineBreakInfo; const Length requestedNumberOfCharacters = mTextUpdateInfo.mRequestedNumberOfCharacters; - if( GET_LINE_BREAKS & operations ) + if( NO_OPERATION != ( GET_LINE_BREAKS & operations ) ) { // Retrieves the line break info. The line break info is used to split the text in 'paragraphs' to // calculate the bidirectional info for each 'paragraph'. @@ -686,7 +686,7 @@ bool Controller::Impl::UpdateModel( OperationsMask operationsRequired ) } Vector& wordBreakInfo = mLogicalModel->mWordBreakInfo; - if( GET_WORD_BREAKS & operations ) + if( NO_OPERATION != ( GET_WORD_BREAKS & operations ) ) { // Retrieves the word break info. The word break info is used to layout the text (where to wrap the text in lines). wordBreakInfo.Resize( numberOfCharacters, TextAbstraction::WORD_NO_BREAK ); @@ -698,8 +698,8 @@ bool Controller::Impl::UpdateModel( OperationsMask operationsRequired ) updated = true; } - const bool getScripts = GET_SCRIPTS & operations; - const bool validateFonts = VALIDATE_FONTS & operations; + const bool getScripts = NO_OPERATION != ( GET_SCRIPTS & operations ); + const bool validateFonts = NO_OPERATION != ( VALIDATE_FONTS & operations ); Vector& scripts = mLogicalModel->mScriptRuns; Vector& validFonts = mLogicalModel->mFontRuns; @@ -743,7 +743,7 @@ bool Controller::Impl::UpdateModel( OperationsMask operationsRequired ) Vector mirroredUtf32Characters; bool textMirrored = false; const Length numberOfParagraphs = mLogicalModel->mParagraphInfo.Count(); - if( BIDI_INFO & operations ) + if( NO_OPERATION != ( BIDI_INFO & operations ) ) { Vector& bidirectionalInfo = mLogicalModel->mBidirectionalParagraphInfo; bidirectionalInfo.Reserve( numberOfParagraphs ); @@ -791,7 +791,7 @@ bool Controller::Impl::UpdateModel( OperationsMask operationsRequired ) newParagraphGlyphs.Reserve( numberOfParagraphs ); const Length currentNumberOfGlyphs = glyphs.Count(); - if( SHAPE_TEXT & operations ) + if( NO_OPERATION != ( SHAPE_TEXT & operations ) ) { const Vector& textToShape = textMirrored ? mirroredUtf32Characters : utf32Characters; // Shapes the text. @@ -815,7 +815,7 @@ bool Controller::Impl::UpdateModel( OperationsMask operationsRequired ) const Length numberOfGlyphs = glyphs.Count() - currentNumberOfGlyphs; - if( GET_GLYPH_METRICS & operations ) + if( NO_OPERATION != ( GET_GLYPH_METRICS & operations ) ) { GlyphInfo* glyphsBuffer = glyphs.Begin(); mMetrics->GetGlyphMetrics( glyphsBuffer + mTextUpdateInfo.mStartGlyphIndex, numberOfGlyphs ); @@ -833,7 +833,7 @@ bool Controller::Impl::UpdateModel( OperationsMask operationsRequired ) updated = true; } - if( COLOR & operationsRequired ) + if( NO_OPERATION != ( COLOR & operationsRequired ) ) { // Set the color runs in glyphs. SetColorSegmentationInfo( mLogicalModel->mColorRuns, diff --git a/dali-toolkit/internal/text/text-controller-impl.h b/dali-toolkit/internal/text/text-controller-impl.h index 4e566ab..99b0c69 100644 --- a/dali-toolkit/internal/text/text-controller-impl.h +++ b/dali-toolkit/internal/text/text-controller-impl.h @@ -628,6 +628,14 @@ struct Controller::Impl */ void ScrollTextToMatchCursor( const CursorInfo& cursorInfo ); +private: + // Declared private and left undefined to avoid copies. + Impl( const Impl& ); + // Declared private and left undefined to avoid copies. + Impl& operator=( const Impl& ); + +public: + ControlInterface& mControlInterface; ///< Reference to the text controller. LogicalModelPtr mLogicalModel; ///< Pointer to the logical model. VisualModelPtr mVisualModel; ///< Pointer to the visual model. diff --git a/dali-toolkit/internal/text/text-controller.cpp b/dali-toolkit/internal/text/text-controller.cpp index 9180ec9..c733384 100644 --- a/dali-toolkit/internal/text/text-controller.cpp +++ b/dali-toolkit/internal/text/text-controller.cpp @@ -1430,7 +1430,7 @@ bool Controller::DoRelayout( const Size& size, const CharacterIndex startIndex = mImpl->mTextUpdateInfo.mParagraphCharacterIndex; const Length requestedNumberOfCharacters = mImpl->mTextUpdateInfo.mRequestedNumberOfCharacters; - if( LAYOUT & operations ) + if( NO_OPERATION != ( LAYOUT & operations ) ) { // Some vectors with data needed to layout and reorder may be void // after the first time the text has been laid out. @@ -1449,7 +1449,7 @@ bool Controller::DoRelayout( const Size& size, if( 0u == totalNumberOfGlyphs ) { - if( UPDATE_ACTUAL_SIZE & operations ) + if( NO_OPERATION != ( UPDATE_ACTUAL_SIZE & operations ) ) { mImpl->mVisualModel->SetLayoutSize( Size::ZERO ); } @@ -1503,7 +1503,7 @@ bool Controller::DoRelayout( const Size& size, if( viewUpdated ) { // Reorder the lines - if( REORDER & operations ) + if( NO_OPERATION != ( REORDER & operations ) ) { Vector& bidirectionalInfo = mImpl->mLogicalModel->mBidirectionalParagraphInfo; Vector& bidirectionalLineInfo = mImpl->mLogicalModel->mBidirectionalLineInfo; @@ -1536,7 +1536,7 @@ bool Controller::DoRelayout( const Size& size, } // REORDER // Sets the actual size. - if( UPDATE_ACTUAL_SIZE & operations ) + if( NO_OPERATION != ( UPDATE_ACTUAL_SIZE & operations ) ) { mImpl->mVisualModel->SetLayoutSize( layoutSize ); } @@ -1550,7 +1550,7 @@ bool Controller::DoRelayout( const Size& size, layoutSize = mImpl->mVisualModel->GetLayoutSize(); } - if( ALIGN & operations ) + if( NO_OPERATION != ( ALIGN & operations ) ) { // The laid-out lines. Vector& lines = mImpl->mVisualModel->mLines; @@ -2105,10 +2105,10 @@ void Controller::TapEvent( unsigned int tapCount, float x, float y ) // This is to avoid unnecessary relayouts when tapping an empty text-field bool relayoutNeeded( false ); - if( ( EventData::EDITING_WITH_PASTE_POPUP == mImpl->mEventData->mState ) || + if( ( EventData::EDITING_WITH_POPUP == mImpl->mEventData->mState ) || ( EventData::EDITING_WITH_PASTE_POPUP == mImpl->mEventData->mState ) ) { - mImpl->ChangeState( EventData::EDITING_WITH_GRAB_HANDLE); // If Popup shown hide it here so can be shown again if required. + mImpl->ChangeState( EventData::EDITING_WITH_GRAB_HANDLE ); // If Popup shown hide it here so can be shown again if required. } if( mImpl->IsShowingRealText() && ( EventData::INACTIVE != mImpl->mEventData->mState ) ) diff --git a/dali-toolkit/internal/text/text-font-style.cpp b/dali-toolkit/internal/text/text-font-style.cpp index 681ffc7..b346d90 100644 --- a/dali-toolkit/internal/text/text-font-style.cpp +++ b/dali-toolkit/internal/text/text-font-style.cpp @@ -100,7 +100,10 @@ void ParseFontStyleString( const std::string& style, Property::Map& map ) { const TreeNode* const node = parser.GetRoot(); - CreateFontStyleMap( node, map ); + if( NULL != node ) + { + CreateFontStyleMap( node, map ); + } } }