summaryrefslogtreecommitdiffstats
path: root/kdevdesigner/designer/resource.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kdevdesigner/designer/resource.cpp')
-rw-r--r--kdevdesigner/designer/resource.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/kdevdesigner/designer/resource.cpp b/kdevdesigner/designer/resource.cpp
index 48da59b4..d4099e34 100644
--- a/kdevdesigner/designer/resource.cpp
+++ b/kdevdesigner/designer/resource.cpp
@@ -1220,7 +1220,10 @@ void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent )
indent--;
ts << makeIndent( indent ) << "</column>" << endl;
}
- saveItem( lv->firstChild(), ts, indent - 1 );
+ if (lv->firstChild())
+ {
+ saveItem( lv->firstChild(), ts, indent - 1 );
+ }
}
#if !defined (TQT_NO_TABLE)
else if ( ::tqt_cast<TQTable*>(obj) ) {
@@ -1280,6 +1283,10 @@ void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent )
void Resource::saveItem( TQListViewItem *i, TQTextStream &ts, int indent )
{
+ if (!i)
+ {
+ return;
+ }
TQListView *lv = i->listView();
while ( i ) {
ts << makeIndent( indent ) << "<item>" << endl;