浏览代码

http connection: add error code path if we can't return a thumbnail

Felix Paul Kühne 9 年之前
父节点
当前提交
604d39c66b
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      Sources/VLCHTTPConnection.m

+ 2 - 1
Sources/VLCHTTPConnection.m

@@ -128,7 +128,7 @@
             @try {
                 mo = [moc existingObjectWithID:[psc managedObjectIDForURIRepresentation:[NSURL URLWithString:filePath]] error:nil];
             }@catch (NSException *exeption) {
-                // somebody gave us a malformed or stale URIRepresentation
+                return [[HTTPErrorResponse alloc] initWithErrorCode:404];
             }
 
             NSData *theData;
@@ -151,6 +151,7 @@
             }
         }
     }
+    return [[HTTPErrorResponse alloc] initWithErrorCode:404];
 }
 
 - (NSObject<HTTPResponse> *)_httpGETLibraryForPath:(NSString *)path