diff options
author | Přemysl Janouch <p.janouch@gmail.com> | 2010-12-05 15:21:00 +0100 |
---|---|---|
committer | Přemysl Janouch <p.janouch@gmail.com> | 2010-12-05 15:21:00 +0100 |
commit | 1d956964e2d6b183f65620505831527a8089f697 (patch) | |
tree | 4a92cb413c7eff8adadd8e83ee9053295bfefc28 /src/ld-library.c | |
parent | 147cf2977ab29d1ab9b9d776ceff5b73a10ac297 (diff) | |
download | logdiag-1d956964e2d6b183f65620505831527a8089f697.tar.gz logdiag-1d956964e2d6b183f65620505831527a8089f697.tar.xz logdiag-1d956964e2d6b183f65620505831527a8089f697.zip |
Random fixes.
Mostly found by -Wextra.
Diffstat (limited to 'src/ld-library.c')
-rw-r--r-- | src/ld-library.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/ld-library.c b/src/ld-library.c index 8fe3a41..de2a052 100644 --- a/src/ld-library.c +++ b/src/ld-library.c @@ -8,6 +8,8 @@ * */ +#include <string.h> + #include <gtk/gtk.h> #include "config.h" @@ -71,7 +73,7 @@ ld_library_class_init (LdLibraryClass *klass) * Contents of the library have changed. */ klass->changed_signal = g_signal_new - ("changed", G_TYPE_FROM_CLASS (object_class), + ("changed", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST | G_SIGNAL_NO_RECURSE | G_SIGNAL_NO_HOOKS, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); @@ -423,8 +425,11 @@ ld_library_remove_child (LdLibrary *self, GObject *child) g_return_if_fail (LD_IS_LIBRARY (self)); g_return_if_fail (G_IS_OBJECT (child)); - g_object_unref (child); - self->priv->children = g_slist_remove (self->priv->children, child); + if (g_slist_find (self->priv->children, child)) + { + g_object_unref (child); + self->priv->children = g_slist_remove (self->priv->children, child); + } } /** |