Fix prevent CID 16045
[platform/framework/web/livebox-viewer.git] / src / fb.c
index d1fe2de..305a0cc 100644 (file)
--- a/src/fb.c
+++ b/src/fb.c
@@ -5,7 +5,7 @@
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
- * http://www.tizenopensource.org/license
+ * http://floralicense.org/license/
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
@@ -227,7 +227,7 @@ static inline __attribute__((always_inline)) int sync_for_pixmap(struct fb_info
         * Use the 24 bits Pixmap for Video player
         */
        xim = XShmCreateImage(s_info.disp, s_info.visual,
-                               24 /* (s_info.depth << 3) */, ZPixmap, NULL,
+                               (s_info.depth << 3), ZPixmap, NULL,
                                &si,
                                info->w, info->h);
        if (xim == NULL) {
@@ -555,6 +555,9 @@ int fb_get_size(struct fb_info *info, int *w, int *h)
 
 int fb_size(struct fb_info *info)
 {
+       if (!info)
+               return 0;
+
        info->bufsz = info->w * info->h * s_info.depth;
        return info ? info->bufsz : 0;
 }