NABI issues
[apps/osp/Internet.git] / src / IntPresentationModelBase.cpp
index 458426a..c0fa1f4 100644 (file)
@@ -453,12 +453,18 @@ PresentationModelBase::ExecuteBookmarkQuery(const Tizen::Base::String& formatQue
                                __pDbStatement->BindString(4,dt.ToString());
                                __pDbStatement->BindString(5,dt.ToString());
 
-                               if(bookmark.GetFavIconBuffer() != null) // When favicon is exist, we save favicon to db.
+                               if(bookmark.GetFavIconBuffer() != null)
                                {
                                        __pDbStatement->BindBlob(6,*(bookmark.GetFavIconBuffer()));
-                                       __pDbStatement->BindInt(7,bookmark.GetFavIconWidth());
-                                       __pDbStatement->BindInt(8,bookmark.GetFavIconHeight());
                                }
+                               else
+                               {
+                                       ByteBuffer buff;
+                                       buff.Construct(10);
+                                       __pDbStatement->BindBlob(6,buff);
+                               }
+                               __pDbStatement->BindInt(7,bookmark.GetFavIconWidth());
+                               __pDbStatement->BindInt(8,bookmark.GetFavIconHeight());
 
                                __pDataBase->ExecuteStatementN(*__pDbStatement);
 
@@ -570,12 +576,18 @@ PresentationModelBase::ExecuteHistoryQuery(const Tizen::Base::String& formatQuer
                                __pDbStatement->BindString(0,historyUrl);
                                __pDbStatement->BindString(1,historyTitle);
                                __pDbStatement->BindDateTime(2, date);
-                               if(history.GetFavIconBuffer() != null)  // When favicon is exist, we save favicon to db.
+                               if(history.GetFavIconBuffer() != null)
                                {
                                        __pDbStatement->BindBlob(3,*(history.GetFavIconBuffer()));
-                                       __pDbStatement->BindInt(4,history.GetFavIconWidth());
-                                       __pDbStatement->BindInt(5,history.GetFavIconHeight());
                                }
+                               else
+                               {
+                                       ByteBuffer buff;
+                                       buff.Construct(10);
+                                       __pDbStatement->BindBlob(3,buff);
+                               }
+                               __pDbStatement->BindInt(4,history.GetFavIconWidth());
+                               __pDbStatement->BindInt(5,history.GetFavIconHeight());
 
                                __pDataBase->ExecuteStatementN(*__pDbStatement);