android - String null pointer exception -
i have strange nullpointerexception @ app. i run code: protected void onpostexecute(void result) { log.i("name1", userprofilepictures[positionforpicture][0]); if(movedtoanotheractivity) return; if(loadnewposts && loaded10more == false) { firstlooppicture = true; positionforpicture = 0; return; } if((positionforpicture == userprofilepictures.length) == false) { new getuserpicture().execute(); int loadlength = loadedpostssaverforpictures.length; string name = userprofilepictures[positionforpicture][0]; log.i("name", name); } } ... ... ... and null pointer exception @ line: string name = userprofilepictures[positionforpicture][0]; log.i("name", name); log cat: 08-28 17:39:28.140: e/androidruntime(26801): fatal exception: main 08-28 17:39:28.140: e/androidruntime(26801): java.lang.nullpointerexception:...