diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/style.cpp | 2 | ||||
| -rw-r--r-- | src/ui/clipboard.cpp | 6 | ||||
| -rw-r--r-- | src/widgets/sp-attribute-widget.cpp | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/style.cpp b/src/style.cpp index 4244798bf..93bd5ac76 100644 --- a/src/style.cpp +++ b/src/style.cpp @@ -506,7 +506,7 @@ sp_style_new_from_object(SPObject *object) style->object = object; style->release_connection = object->connectRelease(sigc::bind<1>(sigc::ptr_fun(&sp_style_object_release), style)); - if (object && object->cloned) { + if (object->cloned) { style->cloned = true; } diff --git a/src/ui/clipboard.cpp b/src/ui/clipboard.cpp index 65141ca10..534f57a57 100644 --- a/src/ui/clipboard.cpp +++ b/src/ui/clipboard.cpp @@ -1479,11 +1479,11 @@ void ClipboardManagerImpl::_userWarn(SPDesktop *desktop, char const *msg) void ClipboardManagerImpl::_inkscape_wait_for_targets(std::list<Glib::ustring> &listTargets) { //Get a newly-allocated array of atoms: - GdkAtom* targets = 0; + GdkAtom* targets = NULL; gint n_targets = 0; gboolean test = gtk_clipboard_wait_for_targets( gtk_clipboard_get(GDK_SELECTION_CLIPBOARD), &targets, &n_targets ); - if (!test) { - n_targets = 0; //otherwise it will be -1. + if (!test || (targets == NULL)) { + return; } //Add the targets to the C++ container: diff --git a/src/widgets/sp-attribute-widget.cpp b/src/widgets/sp-attribute-widget.cpp index 989712b0b..8e3d16da5 100644 --- a/src/widgets/sp-attribute-widget.cpp +++ b/src/widgets/sp-attribute-widget.cpp @@ -99,12 +99,12 @@ void SPAttributeTable::clear(void) for (int i = (ch.size())-1; i >=0 ; i--) { w = ch[i]; - sp_signal_disconnect_by_data (w->gobj(), this); ch.pop_back(); if (w != NULL) { try { + sp_signal_disconnect_by_data (w->gobj(), this); delete w; } catch(...) |
