Fixed prevent defect
authorsuhyung Eom <suhyung.eom@samsung.com>
Thu, 11 Jun 2015 10:49:35 +0000 (19:49 +0900)
committerYoonsang Lee <ysang114.lee@samsung.com>
Tue, 23 Jun 2015 02:30:58 +0000 (11:30 +0900)
< Prevent message >
Dereference null return value (NULL_RETURNS)

Signed-off-by: suhyung Eom <suhyung.eom@samsung.com>
Change-Id: I18968d836de30f0b20ba5a7cb670f451c86dbd01

adaptors/base/update-thread.cpp
adaptors/tizen/adaptor-impl-tizen.cpp
adaptors/x11/pixmap-render-surface-x.cpp

index 2be47bc..a60f6ef 100644 (file)
@@ -226,10 +226,8 @@ void UpdateThread::OutputFPSRecord()
         break;
       }
     }
-
+    fclose( outfile );
   }
-  fclose( outfile );
-
 }
 
 void UpdateThread::UpdateStatusLogging( unsigned int keepUpdatingStatus, bool renderNeedsUpdate )
index 89dcdfe..048dfff 100644 (file)
@@ -36,7 +36,11 @@ void Adaptor::GetDataStoragePath( std::string& path)
 {
   path = "";
 #ifdef OVER_TIZEN_SDK_2_2
-  path = app_get_data_path();
+  char *pathInt = app_get_data_path();
+  if ( pathInt )
+  {
+    path = pathInt;
+  }
 #endif
 }
 
index ab5b4bd..816d2d5 100644 (file)
@@ -194,6 +194,9 @@ void PixmapRenderSurface::CreateXRenderable()
   gc = ecore_x_gc_new( mX11Pixmap,
                        ECORE_X_GC_VALUE_MASK_FOREGROUND,
                        &foreground );
+
+  DALI_ASSERT_ALWAYS( gc && "CreateXRenderable(): failed to get gc" );
+
   ecore_x_drawable_rectangle_fill( mX11Pixmap, gc, 0, 0, mPosition.width, mPosition.height );
 
   DALI_ASSERT_ALWAYS( mX11Pixmap && "Failed to create X pixmap" );