xiterm

simple vte terminal emulator
git clone https://git.ce9e.org/xiterm.git

commit
7a668b39813199216e350adbbdedba066dcf8d6a
parent
995cbf0dcd2287eafafff8e71d7186621feb88c2
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2021-09-24 06:00
rm check in get_current_term

returning NULL is not handled in the calling code, so this will crash
anyways. Better make sure that this doesn't happen.

Diffstat

M xiterm.c 8 ++------

1 files changed, 2 insertions, 6 deletions


diff --git a/xiterm.c b/xiterm.c

@@ -84,12 +84,8 @@ VteTerminal *get_current_term(void) {
   84    84 	int page_num;
   85    85 
   86    86 	page_num = gtk_notebook_get_current_page(notebook);
   87    -1 	if (page_num == -1) {
   88    -1 		return NULL;
   89    -1 	} else {
   90    -1 		GtkWidget *page = gtk_notebook_get_nth_page(notebook, page_num);
   91    -1 		return VTE_TERMINAL(page);
   92    -1 	}
   -1    87 	GtkWidget *page = gtk_notebook_get_nth_page(notebook, page_num);
   -1    88 	return VTE_TERMINAL(page);
   93    89 }
   94    90 
   95    91 const char* get_cwd(VteTerminal *term) {