summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorMinje Ahn <minje.ahn@samsung.com>2017-07-07 04:42:53 (GMT)
committerMinje Ahn <minje.ahn@samsung.com>2017-07-07 04:42:53 (GMT)
commitc5ad1ae3877f3578a820bedbf253c7dd72e8e382 (patch)
tree05879a283577c7a0fdf66d2636bda58b3fc2439e /src/include
parent8003d8e5e3090490a38eef1387ab6c2587dd5b97 (diff)
downloadlibmedia-thumbnail-c5ad1ae3877f3578a820bedbf253c7dd72e8e382.zip
libmedia-thumbnail-c5ad1ae3877f3578a820bedbf253c7dd72e8e382.tar.gz
libmedia-thumbnail-c5ad1ae3877f3578a820bedbf253c7dd72e8e382.tar.bz2
Modified to check if parameter is null when use sqlite3 apirefs/changes/73/137673/1
Change-Id: I452715dee6760ade0203cd21bb12997b93ea3c9e Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
Diffstat (limited to 'src/include')
-rwxr-xr-xsrc/include/util/media-thumb-db.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/include/util/media-thumb-db.h b/src/include/util/media-thumb-db.h
index b3e3666..fc407fa 100755
--- a/src/include/util/media-thumb-db.h
+++ b/src/include/util/media-thumb-db.h
@@ -26,6 +26,8 @@
#define _MEDIA_THUMB_DB_H_
#define STRING_VALID(str) ((str != NULL && strlen(str) > 0) ? TRUE : FALSE)
+#define SQLITE3_FINALIZE(x) {if (x != NULL) sqlite3_finalize(x); }
+#define SQLITE3_SAFE_FREE(x) {if (x != NULL) {sqlite3_free(x); x = NULL; } }
#define SELECT_THUMB_BY_PATH "SELECT thumbnail_path, width, height FROM media WHERE path='%q';"
#define UPDATE_THUMB_BY_PATH "UPDATE media SET thumbnail_path = '%q' WHERE path='%q';"