From b161a8a5a41d2e5fa245d157d3b0f5b8a6c42955 Mon Sep 17 00:00:00 2001 From: lisaac Date: Fri, 11 Dec 2020 14:42:26 +0800 Subject: [PATCH] luci-app-diskman: improve stability --- package/ctcgfw/luci-app-diskman/luasrc/model/diskman.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/ctcgfw/luci-app-diskman/luasrc/model/diskman.lua b/package/ctcgfw/luci-app-diskman/luasrc/model/diskman.lua index dd10876585..bfde90e496 100644 --- a/package/ctcgfw/luci-app-diskman/luasrc/model/diskman.lua +++ b/package/ctcgfw/luci-app-diskman/luasrc/model/diskman.lua @@ -216,7 +216,7 @@ local get_parted_info = function(device) table.insert(partitions_temp, partition_temp) end end - if disk_temp["p_table"] == "MBR" then + if disk_temp and disk_temp["p_table"] == "MBR" then for i, p in ipairs(partitions_temp) do if disk_temp["extended_partition_index"] and p["number"] > 4 then if tonumber(p["sec_end"]) <= tonumber(partitions_temp[disk_temp["extended_partition_index"]]["sec_end"]) and tonumber(p["sec_start"]) >= tonumber(partitions_temp[disk_temp["extended_partition_index"]]["sec_start"]) then