]> git.deb.at Git - pkg/abook.git/blobdiff - ui.c
Fetch real Portuguese debconf translation
[pkg/abook.git] / ui.c
diff --git a/ui.c b/ui.c
index b7c486a1cd57fb86dcb0eabadde8f511505541a4..6fe2f0f47079ff9692441b62356cff8e416683ef 100644 (file)
--- a/ui.c
+++ b/ui.c
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ui.c,v 1.57 2006/04/10 08:15:46 jheinonen Exp $
+ * $Id: ui.c,v 1.58 2006/09/06 02:24:33 cduval Exp $
  *
  * by JH <jheinonen@users.sourceforge.net>
  *
@@ -567,9 +567,13 @@ ui_find(int next)
        } else {
                char *s;
                s = ui_readline("/", findstr, MAX_FIELD_LEN - 1, 0);
-               strncpy(findstr, s, MAX_FIELD_LEN);
-               free(s);
                refresh_screen();
+               if(s == NULL) {
+                       return; /* user cancelled (ctrl-G) */
+               } else {
+                       strncpy(findstr, s, MAX_FIELD_LEN);
+                       free(s);
+               }
        }
 
        if( (item = find_item(findstr, list_get_curitem() + !!next,