[Frugalware-git] setup: fw_checklist(): don't try to select
anything when there are no options
Miklos Vajna
vmiklos at frugalware.org
Thu Mar 5 17:31:13 CET 2009
Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=setup.git;a=commitdiff;h=74098a726048876c1c626e44a8372ebc2bc4ae60
commit 74098a726048876c1c626e44a8372ebc2bc4ae60
Author: Miklos Vajna <vmiklos at frugalware.org>
Date: Thu Mar 5 17:29:02 2009 +0100
fw_checklist(): don't try to select anything when there are no options
- this prevents a segfault eg when there is no partition table on the
disk and the user does not create one when she's asked, either
diff --git a/src/util.c b/src/util.c
index eb0611f..4c6d982 100644
--- a/src/util.c
+++ b/src/util.c
@@ -512,6 +512,9 @@ GList* fw_checklist(const char *title, const char *cprompt, int height,
char *ptr, *ptrn, *buf;
GList *list=NULL;
+ if (!item_no)
+ return NULL;
+
buf = dialog_vars.input_result;
dialog_vars.quoted = 1;
MALLOC(dialog_vars.input_result, item_no*256);
More information about the Frugalware-git
mailing list