Fix crashing when trying to get NULL entry type

This commit is contained in:
Sahin Habermann 2018-02-25 14:36:17 +01:00 committed by Adubbz
parent ddc3fb4e70
commit 60e23002f5

View File

@ -384,6 +384,7 @@ void menuLoop() {
drawEntry(me, entry_start_x + x, is_active); drawEntry(me, entry_start_x + x, is_active);
} }
if(active_entry != NULL) {
if (active_entry->type != ENTRY_TYPE_FOLDER) { if (active_entry->type != ENTRY_TYPE_FOLDER) {
drawImage(1280 - 126 - 30, 720 - 48, 32, 32, themeCurrent.buttonAImage, IMAGE_MODE_RGBA32); drawImage(1280 - 126 - 30, 720 - 48, 32, 32, themeCurrent.buttonAImage, IMAGE_MODE_RGBA32);
DrawText(interuiregular18, 1280 - 90 - 30, 720 - 47, themeCurrent.textColor, textGetString(StrId_Actions_Launch)); DrawText(interuiregular18, 1280 - 90 - 30, 720 - 47, themeCurrent.textColor, textGetString(StrId_Actions_Launch));
@ -392,6 +393,7 @@ void menuLoop() {
drawImage(1280 - 126 - 30, 720 - 48, 32, 32, themeCurrent.buttonAImage, IMAGE_MODE_RGBA32); drawImage(1280 - 126 - 30, 720 - 48, 32, 32, themeCurrent.buttonAImage, IMAGE_MODE_RGBA32);
DrawText(interuiregular18, 1280 - 90 - 30, 720 - 47, themeCurrent.textColor, textGetString(StrId_Actions_Open)); DrawText(interuiregular18, 1280 - 90 - 30, 720 - 47, themeCurrent.textColor, textGetString(StrId_Actions_Open));
} }
}
drawBackBtn(menu, false); drawBackBtn(menu, false);
} }