diff options
Diffstat (limited to '')
-rw-r--r-- | src/c_utils.go | 3 | ||||
-rw-r--r-- | src/i_events.go | 3 | ||||
-rw-r--r-- | src/i_ui.go | 10 |
3 files changed, 10 insertions, 6 deletions
diff --git a/src/c_utils.go b/src/c_utils.go index 84479ce..cefffc5 100644 --- a/src/c_utils.go +++ b/src/c_utils.go @@ -43,7 +43,7 @@ * POSSIBILITY OF SUCH DAMAGE. * * hardflip: src/c_utils.go - * Wed Dec 20 10:50:12 2023 + * Mon Jan 29 08:56:55 2024 * Joe * * core funcs @@ -86,6 +86,7 @@ func c_get_data_dir(ui *HardUI) string { c_die("could read path " + ptr, err) } c_error_mode("could read path" + ptr, err, ui) + return "" // FIX: segv } return ptr diff --git a/src/i_events.go b/src/i_events.go index 11703da..e70b480 100644 --- a/src/i_events.go +++ b/src/i_events.go @@ -167,6 +167,9 @@ func i_fold_dir(data *HardData, item *ItemsNode) { func i_reload_data(data *HardData) { data.data_dir = c_get_data_dir(&data.ui) + if data.data_dir == "" { + return + } g_load_count = -1 data.ldirs, data.litems, data.load_err = i_load_ui(data.data_dir, data.opts, &data.ui) diff --git a/src/i_ui.go b/src/i_ui.go index 83cdf4d..9962df7 100644 --- a/src/i_ui.go +++ b/src/i_ui.go @@ -61,11 +61,11 @@ import ( ) type HardUI struct { - s tcell.Screen - mode uint8 - style [7]tcell.Style - dim [2]int - err [2]string + s tcell.Screen + mode uint8 + style [7]tcell.Style + dim [2]int + err [2]string } func i_left_right(text_len int, ui *HardUI) (int, int) { |