OnlineSpellerImpl::process_fo avoid segfault
authorJoachim Breitner <mail@joachim-breitner.de>
Sat, 17 Apr 2010 15:28:11 +0000 (17:28 +0200)
committerJoachim Breitner <mail@joachim-breitner.de>
Sat, 17 Apr 2010 15:28:11 +0000 (17:28 +0200)
serna/plugins/speller/OnlineSpeller.cxx

index 7eb2d17..d3c4410 100644 (file)
@@ -188,6 +188,8 @@ static void update_fo_decoration(Formatter::TextFo* text_fo)
 
 bool OnlineSpellerImpl::process_fo()
 {
+    if (textFoModList_.isEmpty())
+        return false;
     Formatter::TextFo* text_fo = textFoModList_.pop_front();
     if (!text_fo) {
         deregisterHandler(this);