OSDN Git Service

Correct null pointer exception when adding a new entry.
authorRandy Baumgarte <randy@fbn.cx>
Mon, 13 Sep 2010 14:01:21 +0000 (10:01 -0400)
committerRandy Baumgarte <randy@fbn.cx>
Tue, 14 Sep 2010 10:25:04 +0000 (06:25 -0400)
src/cx/fbn/nevernote/dialog/WatchFolder.java

index 87d479c..2941291 100644 (file)
@@ -190,7 +190,9 @@ public class WatchFolder extends QDialog {
                        String notebook = dialog.books.currentText();\r
                        \r
                        boolean keep;\r
-                       if (dialog.keep.itemData(ItemDataRole.UserRole).toString().equalsIgnoreCase("keep"))\r
+                       int index = dialog.keep.currentIndex();\r
+                       String value  = (String) dialog.keep.itemData(index);\r
+                       if (value.equalsIgnoreCase("keep"))\r
                                keep = true;\r
                        else\r
                                keep = false;\r