From fcb9062b47bcaecc74fb4ec33767f056f04cc10b Mon Sep 17 00:00:00 2001 From: Duy Tran Khanh Date: Tue, 4 Apr 2023 07:10:42 +0700 Subject: [PATCH] Fix: potential out of bounds exception --- Natives/LauncherMenuViewController.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Natives/LauncherMenuViewController.m b/Natives/LauncherMenuViewController.m index 8d3535a7..d03f9dc7 100644 --- a/Natives/LauncherMenuViewController.m +++ b/Natives/LauncherMenuViewController.m @@ -176,6 +176,8 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { + if (indexPath.row < 0) return nil; + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell"]; if (cell == nil) { cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"cell"];