summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJon A. Cruz <jon@joncruz.org>2006-05-14 07:09:55 +0000
committerjoncruz <joncruz@users.sourceforge.net>2006-05-14 07:09:55 +0000
commit42916fd36f8d7d702d1d35687b93a34cf5cc1f9a (patch)
tree092c34ecbdedca008f4333d12507899d5f8c0f57 /src
parent* src/widgets/toolbox.cpp: Slightly increase size of the (diff)
downloadinkscape-42916fd36f8d7d702d1d35687b93a34cf5cc1f9a.tar.gz
inkscape-42916fd36f8d7d702d1d35687b93a34cf5cc1f9a.zip
Fixing hash sort for null
(bzr r832)
Diffstat (limited to 'src')
-rw-r--r--src/extension/db.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/extension/db.h b/src/extension/db.h
index 264e76539..c67a62bf2 100644
--- a/src/extension/db.h
+++ b/src/extension/db.h
@@ -29,7 +29,13 @@ private:
to find the different extensions in the hash map. */
struct ltstr {
bool operator()(const char* s1, const char* s2) const {
- return strcmp(s1, s2) < 0;
+ if ( (s1 == NULL) && (s2 != NULL) ) {
+ return true;
+ } else if (s1 == NULL || s2 == NULL) {
+ return false;
+ } else {
+ return strcmp(s1, s2) < 0;
+ }
}
};
/** This is the actual database. It has all of the modules in it,