[rygel] server: Prevent critical if thumbnail is missing



commit d41e313b1598f87ef75e9c885cf2440e1ae54385
Author: Jens Georg <mail jensge org>
Date:   Sat Aug 4 10:48:25 2012 +0200

    server: Prevent critical if thumbnail is missing

 src/librygel-server/rygel-thumbnailer.vala |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/librygel-server/rygel-thumbnailer.vala b/src/librygel-server/rygel-thumbnailer.vala
index e4f13da..4dfb462 100644
--- a/src/librygel-server/rygel-thumbnailer.vala
+++ b/src/librygel-server/rygel-thumbnailer.vala
@@ -91,6 +91,11 @@ internal class Rygel.Thumbnailer : GLib.Object {
                                         (_("No thumbnail available"));
         }
 
+        if (path == null) {
+            throw new ThumbnailerError.NO_THUMBNAIL
+                                        (_("No thumbnail available"));
+        }
+
         file = File.new_for_path (path);
         info = file.query_info (FileAttribute.ACCESS_CAN_READ + "," +
                                 FileAttribute.STANDARD_SIZE,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]