From 9c64a009db96b6195bf8274ae0e98545c132f78d Mon Sep 17 00:00:00 2001 From: suhyung Eom Date: Thu, 11 Jun 2015 19:49:35 +0900 Subject: [PATCH] Fixed prevent defect < Prevent message > Dereference null return value (NULL_RETURNS) Signed-off-by: suhyung Eom Change-Id: I18968d836de30f0b20ba5a7cb670f451c86dbd01 --- adaptors/base/update-thread.cpp | 4 +--- adaptors/tizen/adaptor-impl-tizen.cpp | 6 +++++- adaptors/x11/pixmap-render-surface-x.cpp | 3 +++ 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/adaptors/base/update-thread.cpp b/adaptors/base/update-thread.cpp index 2be47bc..a60f6ef 100644 --- a/adaptors/base/update-thread.cpp +++ b/adaptors/base/update-thread.cpp @@ -226,10 +226,8 @@ void UpdateThread::OutputFPSRecord() break; } } - + fclose( outfile ); } - fclose( outfile ); - } void UpdateThread::UpdateStatusLogging( unsigned int keepUpdatingStatus, bool renderNeedsUpdate ) diff --git a/adaptors/tizen/adaptor-impl-tizen.cpp b/adaptors/tizen/adaptor-impl-tizen.cpp index 89dcdfe..048dfff 100644 --- a/adaptors/tizen/adaptor-impl-tizen.cpp +++ b/adaptors/tizen/adaptor-impl-tizen.cpp @@ -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 } diff --git a/adaptors/x11/pixmap-render-surface-x.cpp b/adaptors/x11/pixmap-render-surface-x.cpp index ab5b4bd..816d2d5 100644 --- a/adaptors/x11/pixmap-render-surface-x.cpp +++ b/adaptors/x11/pixmap-render-surface-x.cpp @@ -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" ); -- 2.7.4