dia r4328 - in trunk: . objects/UML



Author: hans
Date: Sun Mar 22 20:37:26 2009
New Revision: 4328
URL: http://svn.gnome.org/viewvc/dia?rev=4328&view=rev

Log:
2009-03-22  Hans Breuer  <hans breuer org>

	* plug-ins/UML/class_dialog.c : some more NULL pointer checks to avoid
	crash bug #576247 


Modified:
   trunk/ChangeLog
   trunk/objects/UML/class_dialog.c

Modified: trunk/objects/UML/class_dialog.c
==============================================================================
--- trunk/objects/UML/class_dialog.c	(original)
+++ trunk/objects/UML/class_dialog.c	Sun Mar 22 20:37:26 2009
@@ -719,7 +719,7 @@
   GtkLabel *label;
   char *new_str;
 
-  if (prop_dialog->current_attr != NULL) {
+  if (prop_dialog != NULL && prop_dialog->current_attr != NULL) {
     current_attr = (UMLAttribute *)
       gtk_object_get_user_data(GTK_OBJECT(prop_dialog->current_attr));
     if (current_attr != NULL) {
@@ -760,14 +760,18 @@
    * Thus, we stop it before it gets that bad.  See bug #156706 for
    * one example.
    */
-  if (umlclass->destroyed) return;
+  if (umlclass->destroyed)
+    return;
 
   prop_dialog = umlclass->properties_dialog;
 
+  if (!prop_dialog)
+    return;
+
   attributes_get_current_values(prop_dialog);
   
   list = GTK_LIST(gtklist)->selection;
-  if (!list) { /* No selected */
+  if (!list && prop_dialog) { /* No selected */
     attributes_set_sensitive(prop_dialog, FALSE);
     attributes_clear_values(prop_dialog);
     prop_dialog->current_attr = NULL;



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