summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/designer/designer/resource.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/tools/designer/designer/resource.cpp b/tools/designer/designer/resource.cpp
index ef1b39e9e..9818bd280 100644
--- a/tools/designer/designer/resource.cpp
+++ b/tools/designer/designer/resource.cpp
@@ -1247,7 +1247,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) ) {
@@ -1307,6 +1310,11 @@ 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;