aboutsummaryrefslogtreecommitdiffstats
path: root/i_events.go
diff options
context:
space:
mode:
authorJoe <rbo@gmx.us>2023-12-21 20:20:20 +0100
committerJoe <rbo@gmx.us>2023-12-21 20:20:20 +0100
commitcd5c1143d377c6238ccea57862bd20d4f997ca77 (patch)
tree925b5db30d66e3f2f20999d139302a359f38ada2 /i_events.go
parentcool delete (diff)
downloadhardflip-cd5c1143d377c6238ccea57862bd20d4f997ca77.tar.gz
hardflip-cd5c1143d377c6238ccea57862bd20d4f997ca77.tar.bz2
hardflip-cd5c1143d377c6238ccea57862bd20d4f997ca77.tar.xz
hardflip-cd5c1143d377c6238ccea57862bd20d4f997ca77.tar.zst
hardflip-cd5c1143d377c6238ccea57862bd20d4f997ca77.zip
fixed segv
Diffstat (limited to 'i_events.go')
-rw-r--r--i_events.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/i_events.go b/i_events.go
index 5539e59..1d977e4 100644
--- a/i_events.go
+++ b/i_events.go
@@ -39,7 +39,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* hardflip: src/i_events.go
- * Thu Dec 21 12:03:59 2023
+ * Thu Dec 21 12:49:09 2023
* Joe
*
* the hosts linked list
@@ -107,7 +107,7 @@ func i_events(data *HardData) {
ui.sel = 0
} else if event.Rune() == 'G' {
ui.sel = ui.sel_max - 1
- } else if event.Rune() == 'D' {
+ } else if event.Rune() == 'D' && data.lhost.head != nil {
ui.mode = DELETE_MODE
} else if event.Key() == tcell.KeyEnter {
ui.s.Fini()