summaryrefslogtreecommitdiffstats
path: root/src/libnrtype
diff options
context:
space:
mode:
authorRichard Hughes <cyreve@gmail.com>2006-11-27 00:01:19 +0000
committercyreve <cyreve@users.sourceforge.net>2006-11-27 00:01:19 +0000
commitdeed00277319ad02e7fc837cce0f58964bfbe628 (patch)
tree82ff0476374c267d8f89830cf00c5d58e7e7577c /src/libnrtype
parentbug 1602461: never use font-stretch on win32 because Pango/GDI don't support ... (diff)
downloadinkscape-deed00277319ad02e7fc837cce0f58964bfbe628.tar.gz
inkscape-deed00277319ad02e7fc837cce0f58964bfbe628.zip
bug 1598337 / patch 1603279 by atwupack: crash deleting invisible layers
(bzr r2042)
Diffstat (limited to 'src/libnrtype')
-rwxr-xr-xsrc/libnrtype/Layout-TNG-Compute.cpp2
-rwxr-xr-xsrc/libnrtype/Layout-TNG-Input.cpp6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/libnrtype/Layout-TNG-Compute.cpp b/src/libnrtype/Layout-TNG-Compute.cpp
index c6d18a469..fc69ef4c7 100755
--- a/src/libnrtype/Layout-TNG-Compute.cpp
+++ b/src/libnrtype/Layout-TNG-Compute.cpp
@@ -927,7 +927,7 @@ void Layout::Calculator::_computeFontLineHeight(font_instance *font, double font
}
break;
}
- if (style->object->parent == NULL) break;
+ if (style->object == NULL || style->object->parent == NULL) break;
style = style->object->parent->style;
if (style == NULL) break;
}
diff --git a/src/libnrtype/Layout-TNG-Input.cpp b/src/libnrtype/Layout-TNG-Input.cpp
index 295b062a2..499f67a7b 100755
--- a/src/libnrtype/Layout-TNG-Input.cpp
+++ b/src/libnrtype/Layout-TNG-Input.cpp
@@ -140,7 +140,7 @@ float Layout::InputStreamTextSource::styleComputeFontSize() const
}
}
}
- if (this_style->object->parent == NULL) break;
+ if (this_style->object == NULL || this_style->object->parent == NULL) break;
this_style = this_style->object->parent->style;
if (this_style == NULL) break;
}
@@ -169,7 +169,7 @@ Layout::Direction Layout::InputStreamTextSource::styleGetBlockProgression() cons
return (Layout::Direction)_enum_converter(this_style->block_progression.computed, enum_convert_spstyle_block_progression_to_direction, sizeof(enum_convert_spstyle_block_progression_to_direction)/sizeof(enum_convert_spstyle_block_progression_to_direction[0]));
if (this_style->writing_mode.set)
return (Layout::Direction)_enum_converter(this_style->writing_mode.computed, enum_convert_spstyle_writing_mode_to_direction, sizeof(enum_convert_spstyle_writing_mode_to_direction)/sizeof(enum_convert_spstyle_writing_mode_to_direction[0]));
- if (this_style->object->parent == NULL) break;
+ if (this_style->object == NULL || this_style->object->parent == NULL) break;
this_style = this_style->object->parent->style;
if (this_style == NULL) break;
}
@@ -213,7 +213,7 @@ Layout::Alignment Layout::InputStreamTextSource::styleGetAlignment(Layout::Direc
}
if (this_style->text_anchor.set)
return text_anchor_to_alignment(this_style->text_anchor.computed, para_direction);
- if (this_style->object->parent == NULL) break;
+ if (this_style->object == NULL || this_style->object->parent == NULL) break;
this_style = this_style->object->parent->style;
if (this_style == NULL) break;
}