Skip to content

Commit a463854

Browse files
committed
Fix crash on empty files (variar#134)
1 parent b21d648 commit a463854

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/logdata/src/logdataworker.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -514,6 +514,10 @@ void IndexOperation::doIndex( LineOffset initialPosition )
514514
LOG( logINFO ) << "Indexing done, took " << duration << " ms, io " << ioDuration << " ms";
515515
LOG( logINFO ) << "Indexing perf " << ( 1000.f * state.file_size / duration ) / ( 1024 * 1024 )
516516
<< " MiB/s";
517+
518+
if ( !indexing_data_.getEncodingGuess() ) {
519+
indexing_data_.setEncodingGuess( QTextCodec::codecForLocale() );
520+
}
517521
}
518522

519523
// Called in the worker thread's context

0 commit comments

Comments
 (0)