shithub: view

Download patch

ref: 66c483d5d3e64d53490dc1a8fe51351cdd047e7b
parent: 84cf99a0f4f48ef411b49ec4575f2e5d47a7907d
author: phil9 <telephil9@gmail.com>
date: Fri Nov 26 00:31:13 EST 2021

fix crash when not selecting any item in menu2

--- a/view.c
+++ b/view.c
@@ -335,7 +335,6 @@
 	int n;
 	char buf[255];
 
-	i = nil;
 	n = menuhit(2, mctl, &menu2, nil);
 	switch(n){
 	case Mzoomin:
@@ -362,6 +361,8 @@
 			return;
 		}
 		break;
+	default:
+		return;
 	}
 	freeimage(img);
 	img = i;