diff --git a/apple/iOS/browser.m b/apple/iOS/browser.m index 1ceb8e98db..bb5d7749a7 100644 --- a/apple/iOS/browser.m +++ b/apple/iOS/browser.m @@ -23,6 +23,7 @@ #include #include "../../content.h" +#include "../../general.h" #include #include "../../file_ops.h" #include @@ -233,7 +234,7 @@ static void file_action(enum file_action action, NSString* source, NSString* tar [self.sections addObject:[NSMutableArray arrayWithObject:i]]; // List contents - struct string_list* contents = dir_list_new(self.path.UTF8String, self.extensions.UTF8String, true); + struct string_list *contents = dir_list_new(self.path.UTF8String, g_settings.menu.navigation.browser.filter.supported_extensions_enable ? self.extensions.UTF8String : NULL, true); if (contents) { @@ -422,7 +423,7 @@ static void file_action(enum file_action action, NSString* source, NSString* tar // List contents - struct string_list* contents = dir_list_new([self.path stringByDeletingLastPathComponent].UTF8String, 0, true); + struct string_list* contents = dir_list_new([self.path stringByDeletingLastPathComponent].UTF8String, NULL, true); NSMutableArray* items = [NSMutableArray arrayWithObject:BOXSTRING("")]; if (contents) diff --git a/menu/disp/rgui.c b/menu/disp/rgui.c index 44f85400a1..e5e31a2f9d 100644 --- a/menu/disp/rgui.c +++ b/menu/disp/rgui.c @@ -93,6 +93,10 @@ static void fill_rect(uint16_t *buf, unsigned pitch, uint16_t (*col)(unsigned x, unsigned y)) { unsigned j, i; + + if (!buf) + return; + for (j = y; j < y + height; j++) for (i = x; i < x + width; i++) buf[j * (pitch >> 1) + i] = col(i, j);