summaryrefslogtreecommitdiffstats
path: root/src/ui
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/clipboard.cpp6
1 files changed, 3 insertions, 3 deletions
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: