summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKees Cook <kees@outflux.net>2007-01-13 07:28:41 +0000
committerkeescook <keescook@users.sourceforge.net>2007-01-13 07:28:41 +0000
commitd51c37d151d2e080aec01158d77eaadd0b213e13 (patch)
tree74ceffd02b0ad1b5d8ae176ac5e830278dc32a5f /src
parentfull correction for rest of test builds (diff)
downloadinkscape-d51c37d151d2e080aec01158d77eaadd0b213e13.tar.gz
inkscape-d51c37d151d2e080aec01158d77eaadd0b213e13.zip
fixes for style-test prefs crashes
(bzr r2202)
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am6
-rw-r--r--src/inkscape.cpp1
-rw-r--r--src/style-test.cpp1
-rw-r--r--src/xml/repr.h2
4 files changed, 10 insertions, 0 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index c5d9138b9..cda0a04fd 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -194,6 +194,12 @@ TESTS = \
xml/quote-test$(EXEEXT) \
xml/repr-action-test$(EXEEXT)
+# Amd64 failures??
+#XFAIL_TESTS = \
+# test-all$(EXEEXT) \
+# style-test$(EXEEXT) \
+# svg/test-svg$(EXEEXT)
+
# streamtest is unfinished and can't handle the relocations done during
# "make distcheck". Not needed for the 0.41 release.
# io/streamtest$(EXEEXT)
diff --git a/src/inkscape.cpp b/src/inkscape.cpp
index d3cc1aa00..b7af482b2 100644
--- a/src/inkscape.cpp
+++ b/src/inkscape.cpp
@@ -713,6 +713,7 @@ inkscape_get_repr (Inkscape::Application *inkscape, const gchar *key)
}
Inkscape::XML::Node *repr = sp_repr_document_root (Inkscape::Preferences::get());
+ if (!repr) return NULL;
g_assert (!(strcmp (repr->name(), "inkscape")));
gchar const *s = key;
diff --git a/src/style-test.cpp b/src/style-test.cpp
index 54be0040e..5c123704b 100644
--- a/src/style-test.cpp
+++ b/src/style-test.cpp
@@ -619,6 +619,7 @@ test_style()
utest_start("style");
UTEST_TEST("sp_style_new, sp_style_write_string") {
SPStyle *style = sp_style_new();
+ g_assert(style);
gchar *str0_all = sp_style_write_string(style, SP_STYLE_FLAG_ALWAYS);
gchar *str0_set = sp_style_write_string(style, SP_STYLE_FLAG_IFSET);
UTEST_ASSERT(*str0_set == '\0');
diff --git a/src/xml/repr.h b/src/xml/repr.h
index dc96cb3e6..f930ed0c5 100644
--- a/src/xml/repr.h
+++ b/src/xml/repr.h
@@ -143,11 +143,13 @@ Inkscape::XML::Document *sp_repr_document_new(gchar const *rootname);
/// Returns root node of document.
inline Inkscape::XML::Node *sp_repr_document_root(Inkscape::XML::Document const *doc) {
+ if (!doc) return NULL;
return const_cast<Inkscape::XML::Node *>(doc->root());
}
/// Returns the node's document.
inline Inkscape::XML::Document *sp_repr_document(Inkscape::XML::Node const *repr) {
+ if (!repr) return NULL;
return const_cast<Inkscape::XML::Document *>(repr->document());
}