OSDN Git Service

Check for possible null pointer error.
authorRandy Baumgarte <randy@fbn.cx>
Wed, 7 Sep 2011 18:30:23 +0000 (14:30 -0400)
committerRandy Baumgarte <randy@fbn.cx>
Wed, 7 Sep 2011 18:30:23 +0000 (14:30 -0400)
src/cx/fbn/nevernote/filters/NoteSortFilterProxyModel.java

index a99777c..d92c820 100644 (file)
@@ -51,7 +51,7 @@ public class NoteSortFilterProxyModel extends QSortFilterProxyModel {
        public void addGuid(String guid, NoteMetadata meta) {\r
                if (!guids.containsKey(guid))\r
                        guids.put(guid, meta);\r
        public void addGuid(String guid, NoteMetadata meta) {\r
                if (!guids.containsKey(guid))\r
                        guids.put(guid, meta);\r
-               if (meta.isPinned() == true && !pinnedGuids.containsKey(guid))\r
+               if (meta!= null && pinnedGuids != null && meta.isPinned() == true && !pinnedGuids.containsKey(guid))\r
                        pinnedGuids.put(guid, meta);\r
        }\r
        public void filter() {\r
                        pinnedGuids.put(guid, meta);\r
        }\r
        public void filter() {\r