OSDN Git Service

Add check for length = 0 on recognition in highlight checking.
authorRandy Baumgarte <randy@fbn.cx>
Sun, 2 Jan 2011 00:11:08 +0000 (19:11 -0500)
committerRandy Baumgarte <randy@fbn.cx>
Sun, 2 Jan 2011 00:12:07 +0000 (19:12 -0500)
src/cx/fbn/nevernote/xml/NoteFormatter.java

index 922777f..d513322 100644 (file)
@@ -132,7 +132,7 @@ public class NoteFormatter {
                \r
                // Get the recognition XML that tells where to hilight on the image\r
                Resource recoResource = conn.getNoteTable().noteResourceTable.getNoteResourceRecognition(resGuid);\r
-               if (recoResource.getRecognition().getBody() == null)\r
+               if (recoResource.getRecognition().getBody() == null || recoResource.getRecognition().getBody().length == 0)\r
                        return;\r
                QByteArray recoData = new QByteArray(recoResource.getRecognition().getBody());\r
                String xml = recoData.toString();\r