diff options
| author | Kris De Gussem <kris.degussem@gmail.com> | 2012-02-21 19:51:35 +0000 |
|---|---|---|
| committer | Kris <Kris.De.Gussem@hotmail.com> | 2012-02-21 19:51:35 +0000 |
| commit | 354e3b4f0fd6fcca9995d611b6f031dfa9068ee7 (patch) | |
| tree | 6bd095dbd0218b72f29147a6ede741092565dda9 /src/ui/clipboard.cpp | |
| parent | Fix for 934721 : Convert SpellCheck dialog to a dockable dialog (diff) | |
| download | inkscape-354e3b4f0fd6fcca9995d611b6f031dfa9068ee7.tar.gz inkscape-354e3b4f0fd6fcca9995d611b6f031dfa9068ee7.zip | |
cppcheck: null pointer dereference fix
(bzr r11007)
Diffstat (limited to 'src/ui/clipboard.cpp')
| -rw-r--r-- | src/ui/clipboard.cpp | 6 |
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: |
