{"action":"opened","issue":{"url":"https://api.github.com/repos/realm/realm-java/issues/3819","repository_url":"https://api.github.com/repos/realm/realm-java","labels_url":"https://api.github.com/repos/realm/realm-java/issues/3819/labels{/name}","comments_url":"https://api.github.com/repos/realm/realm-java/issues/3819/comments","events_url":"https://api.github.com/repos/realm/realm-java/issues/3819/events","html_url":"https://github.com/realm/realm-java/issues/3819","id":190555039,"number":3819,"title":"                  java.lang.NullPointerException: Attempt to invoke virtual method 'boolean io.realm.RealmResults.add(io.realm.RealmModel)' on a null object reference","user":{"login":"campanoon","id":22452891,"avatar_url":"https://avatars.githubusercontent.com/u/22452891?v=3","gravatar_id":"","url":"https://api.github.com/users/campanoon","html_url":"https://github.com/campanoon","followers_url":"https://api.github.com/users/campanoon/followers","following_url":"https://api.github.com/users/campanoon/following{/other_user}","gists_url":"https://api.github.com/users/campanoon/gists{/gist_id}","starred_url":"https://api.github.com/users/campanoon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/campanoon/subscriptions","organizations_url":"https://api.github.com/users/campanoon/orgs","repos_url":"https://api.github.com/users/campanoon/repos","events_url":"https://api.github.com/users/campanoon/events{/privacy}","received_events_url":"https://api.github.com/users/campanoon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-20T12:18:27Z","updated_at":"2016-11-20T12:18:27Z","closed_at":null,"body":"My problem is I have a RealmList and my Custom ListView adapter only accepts RealmResults.\r\n\r\n\r\n#### Actual Results\r\n\r\nE/AndroidRuntime: FATAL EXCEPTION: main\r\n                  Process: com.example.jmcampanon.nowcook, PID: 5357\r\n                  java.lang.NullPointerException: Attempt to invoke virtual method 'boolean io.realm.RealmResults.add(io.realm.RealmModel)' on a null object reference\r\n                      at com.example.jmcampanon.nowcook.fragments.RecipesFragment.getRecipes(RecipesFragment.java:133)\r\n                      at com.example.jmcampanon.nowcook.fragments.RecipesFragment.onCreateView(RecipesFragment.java:85)\r\n                      at android.support.v4.app.Fragment.performCreateView(Fragment.java:2080)\r\n                      at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1108)\r\n                      at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1290)\r\n                      at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:801)\r\n                      at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1677)\r\n                      at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:536)\r\n                      at android.os.Handler.handleCallback(Handler.java:751)\r\n                      at android.os.Handler.dispatchMessage(Handler.java:95)\r\n                      at android.os.Looper.loop(Looper.java:154)\r\n                      at android.app.ActivityThread.main(ActivityThread.java:6077)\r\n                      at java.lang.reflect.Method.invoke(Native Method)\r\n                      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)\r\n                      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)\r\n\r\n#### Code Sample\r\n\r\n```java\r\nArrayList<Recipe> RecetasCoinciden;\r\n\r\nRealmResults<Recipe> Recipes = null;\r\n        for (Recipe Receta:RecetasCoinciden){\r\n            Recipes.add(Receta);\r\n        }\r\n\r\n```\r\n\r\n"}}
{"actor":{"display_login":"campanoon"}}