Fix SVACE issues 45/170345/1
authorSeoyeon Kim <seoyeon2.kim@samsung.com>
Mon, 19 Feb 2018 08:15:28 +0000 (17:15 +0900)
committerSeoyeon Kim <seoyeon2.kim@samsung.com>
Mon, 19 Feb 2018 08:16:37 +0000 (17:16 +0900)
- Initialized some member variables.
- Pointer 'objectSet' would be NULL value, so need to check NULL dereference
  before 'FcObjectSetAdd()'.

Change-Id: I88583c18f53898badccfe75e5ab8981d78b340cf
Signed-off-by: Seoyeon Kim <seoyeon2.kim@samsung.com>
dali/internal/system/common/frame-time-stats.cpp
dali/internal/text/text-abstraction/font-client-plugin-impl.cpp

index 36bf60a..115e124 100644 (file)
@@ -105,6 +105,7 @@ void FrameTimeStats::Reset()
   mMin = 0.f;
   mMax = 0.f;
   mRunCount = 0;
+  mStart = FrameTimeStamp();
   mSamples.Clear();
 }
 
index 6e91eb5..6b1e491 100644 (file)
@@ -1424,23 +1424,25 @@ _FcFontSet* FontClient::Plugin::GetFcFontSet() const
   // a pattern holds a set of names, each name refers to a property of the font
   FcPattern* pattern = FcPatternCreate();
 
+  FcFontSet* fontset = NULL;
+
   // create an object set used to define which properties are to be returned in the patterns from FcFontList.
   FcObjectSet* objectSet = FcObjectSetCreate();
 
-  // build an object set from a list of property names
-  FcObjectSetAdd( objectSet, FC_FILE );
-  FcObjectSetAdd( objectSet, FC_FAMILY );
-  FcObjectSetAdd( objectSet, FC_WIDTH );
-  FcObjectSetAdd( objectSet, FC_WEIGHT );
-  FcObjectSetAdd( objectSet, FC_SLANT );
-
-  // get a list of fonts
-  // creates patterns from those fonts containing only the objects in objectSet and returns the set of unique such patterns
-  FcFontSet* fontset = FcFontList( NULL /* the default configuration is checked to be up to date, and used */, pattern, objectSet );
-
-  // clear up the object set
   if( objectSet )
   {
+    // build an object set from a list of property names
+    FcObjectSetAdd( objectSet, FC_FILE );
+    FcObjectSetAdd( objectSet, FC_FAMILY );
+    FcObjectSetAdd( objectSet, FC_WIDTH );
+    FcObjectSetAdd( objectSet, FC_WEIGHT );
+    FcObjectSetAdd( objectSet, FC_SLANT );
+
+    // get a list of fonts
+    // creates patterns from those fonts containing only the objects in objectSet and returns the set of unique such patterns
+    fontset = FcFontList( NULL /* the default configuration is checked to be up to date, and used */, pattern, objectSet );
+
+    // clear up the object set
     FcObjectSetDestroy( objectSet );
   }
   // clear up the pattern