freesound: break page-request loop if search result is empty.
authorRobin Gareus <robin@gareus.org>
Fri, 21 Dec 2012 14:26:10 +0000 (14:26 +0000)
committerRobin Gareus <robin@gareus.org>
Fri, 21 Dec 2012 14:26:10 +0000 (14:26 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@13699 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/sfdb_ui.cc

index 42d304e8f4cfae8d9a2ce78effd48b90bfa59806..76be33ad0d21022956ce2b8296a49cd5b946df9b 100644 (file)
@@ -879,6 +879,11 @@ SoundFileBrowser::freesound_search()
                }
                
                XMLNodeList sounds = sounds_root->children();
+               if (sounds.size() == 0) {
+                       /* nothing found */
+                       break;
+               }
+
                XMLNodeConstIterator niter;
                XMLNode *node;
                for (niter = sounds.begin(); niter != sounds.end(); ++niter) {