diff --git a/YACReaderLibrary/server_config_dialog.cpp b/YACReaderLibrary/server_config_dialog.cpp index 04b87071..a44a5271 100644 --- a/YACReaderLibrary/server_config_dialog.cpp +++ b/YACReaderLibrary/server_config_dialog.cpp @@ -249,10 +249,13 @@ void ServerConfigDialog::generateQR() } #endif - stl::sort(otherAddresses.begin(),otherAddresses.end(),ipComparator); + std::sort(otherAddresses.begin(),otherAddresses.end(),ipComparator); - if(otherAddresses.length()>0) - dir = otherAddresses.pop_front(); + if(!otherAddresses.isEmpty()) + { + dir = otherAddresses.first(); + otherAddresses.pop_front(); + } if(otherAddresses.length()>0 || !dir.isEmpty()) {