diff --git a/TrollStore/TSAppTableViewController.m b/TrollStore/TSAppTableViewController.m index b77377c..fae8585 100644 --- a/TrollStore/TSAppTableViewController.m +++ b/TrollStore/TSAppTableViewController.m @@ -344,10 +344,12 @@ UIImage* imageWithSize(UIImage* image, CGSize size) - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"ApplicationCell"]; - if (!cell) { + if(!cell) { cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:@"ApplicationCell"]; } + if(!indexPath || indexPath.row > (_cachedAppInfos.count - 1)) return cell; + TSAppInfo* appInfo = _cachedAppInfos[indexPath.row]; NSString* appId = [appInfo bundleIdentifier]; NSString* appVersion = [appInfo versionString]; diff --git a/TrollStore/TSInstallationController.m b/TrollStore/TSInstallationController.m index dee437f..0b3e674 100644 --- a/TrollStore/TSInstallationController.m +++ b/TrollStore/TSInstallationController.m @@ -191,6 +191,7 @@ extern NSUserDefaults* trollStoreUserDefaults(void); { fetchLatestLdidVersion(^(NSString* latestVersion) { + if(!latestVersion) return; dispatch_async(dispatch_get_main_queue(), ^ { NSURL* ldidURL = [NSURL URLWithString:@"https://github.com/opa334/ldid/releases/latest/download/ldid"]; @@ -214,7 +215,7 @@ extern NSUserDefaults* trollStoreUserDefaults(void); }]; }); } - else + else if(location) { spawnRoot(rootHelperPath(), @[@"install-ldid", location.path, latestVersion], nil, nil); dispatch_async(dispatch_get_main_queue(), ^