Patch against segfault at startup

Michael Mauch michael.mauch@gmx.de
Sun Dec 2 01:49:01 2001


Hi,

when I started gpa 0.4.2, it dumped core. Here's a patch that made this
problem go away:

--- src/keyring.c~	Wed May 30 09:36:37 2001
+++ src/keyring.c	Sat Dec  1 17:59:05 2001
@@ -1188,9 +1188,9 @@
   gchar * key_id = gpa_default_key ();
   GpapaPublicKey * key;
 
-  if (key_id)
+  if (key_id 
+      && ((key = gpapa_get_public_key_by_ID (key_id, gpa_callback, editor->window))))
     {
-      key = gpapa_get_public_key_by_ID (key_id, gpa_callback, editor->window);
       gtk_label_set_text (GTK_LABEL (editor->status_key_user),
 			  gpapa_key_get_name (GPAPA_KEY (key), gpa_callback,
 					      editor->window));


Regards...
		Michael