gimp r24686 - in trunk: . plug-ins/imagemap



Author: neo
Date: Wed Jan 23 11:57:14 2008
New Revision: 24686
URL: http://svn.gnome.org/viewvc/gimp?rev=24686&view=rev

Log:
2008-01-23  Sven Neumann  <sven gimp org>

	* plug-ins/imagemap/imap_mru.c (mru_remove_link): gracefully
	handle a NULL link.
	(mru_destruct): plugged a memory leak.

	* plug-ins/imagemap/imap_about.c: use "program-name" instead
	of "name".



Modified:
   trunk/ChangeLog
   trunk/plug-ins/imagemap/imap_about.c
   trunk/plug-ins/imagemap/imap_mru.c

Modified: trunk/plug-ins/imagemap/imap_about.c
==============================================================================
--- trunk/plug-ins/imagemap/imap_about.c	(original)
+++ trunk/plug-ins/imagemap/imap_about.c	Wed Jan 23 11:57:14 2008
@@ -40,7 +40,7 @@
 
        dialog = g_object_new (GTK_TYPE_ABOUT_DIALOG,
                               "transient-for", get_dialog(),
-                              "name",    _("Image Map Plug-In"),
+                              "program-name",  _("Image Map Plug-In"),
                               "version", "2.3",
                               "authors", authors,
                               "copyright",

Modified: trunk/plug-ins/imagemap/imap_mru.c
==============================================================================
--- trunk/plug-ins/imagemap/imap_mru.c	(original)
+++ trunk/plug-ins/imagemap/imap_mru.c	Wed Jan 23 11:57:14 2008
@@ -42,14 +42,18 @@
 mru_destruct(MRU_t *mru)
 {
    g_list_foreach(mru->list, (GFunc) g_free, NULL);
+   g_list_free (mru->list);
    g_free(mru);
 }
 
 static void
 mru_remove_link(MRU_t *mru, GList *link)
 {
-   g_free(link->data);
-   mru->list = g_list_remove_link(mru->list, link);
+  if (link)
+    {
+      g_free(link->data);
+      mru->list = g_list_remove_link(mru->list, link);
+    }
 }
 
 static GList*



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