summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2012-12-21 14:26:10 +0000
committerRobin Gareus <robin@gareus.org>2012-12-21 14:26:10 +0000
commit51091b2cf9f020001b770db17fdd13d6439e3306 (patch)
treead9e40d6d06c54d514ffa86f9004a07835eeb5de
parentcea21cab7e1b80ec5784ca71035d5f1b796ebb61 (diff)
freesound: break page-request loop if search result is empty.
git-svn-id: svn://localhost/ardour2/branches/3.0@13699 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r--gtk2_ardour/sfdb_ui.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/gtk2_ardour/sfdb_ui.cc b/gtk2_ardour/sfdb_ui.cc
index 42d304e8f4..76be33ad0d 100644
--- a/gtk2_ardour/sfdb_ui.cc
+++ b/gtk2_ardour/sfdb_ui.cc
@@ -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) {