--- sopranoindexwriter.cpp 2009-08-23 20:06:51.000000000 +0200 +++ sopranoindexwriter.cpp 2009-08-23 20:03:53.000000000 +0200 @@ -42,6 +42,7 @@ #include #include +#include #include #include @@ -502,6 +503,16 @@ // Thus, we can just remember that and use it here. // + // mjansen: 08/2009 - I get many crashes here and can't print s, p and o + // from the debugger with the core files. So print out this information + // and then die. + if (!d->currentResult) { + kWarning() << "Attempt to add" << s.c_str() << p.c_str() << o.c_str() << "to IndexWriter with currentResult = NULL"; + Q_ASSERT(d->currentResult); + // In production just return. + return; + } + FileMetaData* md = static_cast( d->currentResult->writerData() ); QUrl subject = d->mapNode( md, s );