mirror of
https://github.com/clangen/musikcube.git
synced 2025-01-01 17:58:29 +00:00
Small fix in query::SortTracksWithData to handle NULL values.
This commit is contained in:
parent
94530ec9a4
commit
a1fd1978c7
@ -145,7 +145,10 @@ bool Query::SortTracksWithData::ParseQuery(Library::Base *library,db::Connection
|
||||
while(selectTracks.Step()==db::ReturnCode::Row){
|
||||
TrackWithSortdata newSortData;
|
||||
newSortData.track.reset(new LibraryTrack(selectTracks.ColumnInt(0),library->Id()));
|
||||
newSortData.sortData = selectTracks.ColumnTextUTF(1);
|
||||
const utfchar* sortDataPtr = selectTracks.ColumnTextUTF(1);
|
||||
if(sortDataPtr){
|
||||
newSortData.sortData = sortDataPtr;
|
||||
}
|
||||
|
||||
// Convert the content to lower if futher sorting need to be done
|
||||
boost::algorithm::to_lower(newSortData.sortData);
|
||||
|
Loading…
Reference in New Issue
Block a user