]> git.lyx.org Git - features.git/blobdiff - src/support/lyxstring.C
Fixed some bugs for tabulars & xforms-0.89, in vspace.C and lyxstring.
[features.git] / src / support / lyxstring.C
index e652321194e304b7882fdc04324e7e913e81c75b..7d7c614ed05cac2c090dc1491e3d92e2ffc663b6 100644 (file)
@@ -337,7 +337,7 @@ lyxstring::lyxstring(value_type const * s, size_type n)
 {
        Assert(s); // we don't allow null pointers
        static Srep empty_rep(0, "");
-       if (*s && n) { // s is not empty string and n > 0
+       if (s && *s && n) { // s is not empty string and n > 0
                rep = new Srep(min(strlen(s), n), s);
        } else {
                ++empty_rep.ref;
@@ -348,9 +348,10 @@ lyxstring::lyxstring(value_type const * s, size_type n)
 
 lyxstring::lyxstring(value_type const * s)
 {
-       Assert(s); // we don't allow null pointers
+       // yes we allow them just don't initalize them
+       // Assert(s); // we don't allow null pointers
        static Srep empty_rep(0, "");
-       if (*s) { // s is not empty string
+       if (s && *s) { // s is not empty string
                rep = new Srep(strlen(s), s);
        } else {
                ++empty_rep.ref;