pspp-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pspp-cvs] pspp/src/ui/gui ChangeLog compute-dialog.c


From: John Darrington
Subject: [Pspp-cvs] pspp/src/ui/gui ChangeLog compute-dialog.c
Date: Wed, 13 Feb 2008 03:22:03 +0000

CVSROOT:        /sources/pspp
Module name:    pspp
Changes by:     John Darrington <jmd>   08/02/13 03:22:03

Modified files:
        src/ui/gui     : ChangeLog compute-dialog.c 

Log message:
        Fixed crash when trying to get the label of a non-existant variable.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/pspp/src/ui/gui/ChangeLog?cvsroot=pspp&r1=1.110&r2=1.111
http://cvs.savannah.gnu.org/viewcvs/pspp/src/ui/gui/compute-dialog.c?cvsroot=pspp&r1=1.14&r2=1.15

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/pspp/pspp/src/ui/gui/ChangeLog,v
retrieving revision 1.110
retrieving revision 1.111
diff -u -b -r1.110 -r1.111
--- ChangeLog   13 Feb 2008 02:59:30 -0000      1.110
+++ ChangeLog   13 Feb 2008 03:22:02 -0000      1.111
@@ -4,6 +4,9 @@
        variable selected.  Add a valid predicate so that this can't 
        happen anyway.
 
+       * compute-dialog.c: Fix crash when trying to set label on non
+       existant variable.
+
 2008-02-09  Ben Pfaff  <address@hidden>
 
        Consolidate multiple messages into single message dialog.  Patch

Index: compute-dialog.c
===================================================================
RCS file: /sources/pspp/pspp/src/ui/gui/compute-dialog.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- compute-dialog.c    3 Feb 2008 12:09:25 -0000       1.14
+++ compute-dialog.c    13 Feb 2008 03:22:03 -0000      1.15
@@ -325,10 +325,15 @@
        (GTK_ENTRY (get_widget_assert (cd->xml, "compute-entry1")));
 
       target_var = psppire_dict_lookup_var (cd->dict, target_name);
+      if ( target_var )
+       {
       label = var_get_label (target_var);
 
       if ( label )
        gtk_entry_set_text (GTK_ENTRY (entry), label);
+       }
+      else
+       gtk_entry_set_text (GTK_ENTRY (entry), "");
 
       gtk_widget_set_sensitive (entry, TRUE);
     }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]