diff options
| author | Kris De Gussem <kris.degussem@gmail.com> | 2012-05-12 11:16:29 +0000 |
|---|---|---|
| committer | Kris <Kris.De.Gussem@hotmail.com> | 2012-05-12 11:16:29 +0000 |
| commit | adc17549c5f0485a30a87e7674c7779ef3155d6c (patch) | |
| tree | 5d7600ee04a17673e9af977637c4cd89fe5e4938 /src/xml/repr-util.cpp | |
| parent | Fix for externally reported patch by Juergen Weigert, Bug #993500 (inkscape s... (diff) | |
| download | inkscape-adc17549c5f0485a30a87e7674c7779ef3155d6c.tar.gz inkscape-adc17549c5f0485a30a87e7674c7779ef3155d6c.zip | |
syntx of null pointer dereference checks
(bzr r11358)
Diffstat (limited to 'src/xml/repr-util.cpp')
| -rw-r--r-- | src/xml/repr-util.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/xml/repr-util.cpp b/src/xml/repr-util.cpp index 6899e77ee..5b8ab12ae 100644 --- a/src/xml/repr-util.cpp +++ b/src/xml/repr-util.cpp @@ -261,8 +261,13 @@ gchar const *sp_xml_ns_uri_prefix(gchar const *uri, gchar const *suggested) GQuark const prefix_key=g_quark_from_string(suggested); SPXMLNs *found=namespaces; - while ( found && found->prefix != prefix_key ) { - found = found->next; + while (found) { + if (found->prefix != prefix_key) { + found = found->next; + } + else { + break; + } } if (found) { // prefix already used? |
