Skip to content

Commit

Permalink
Prevent crash when turning screen during trip search
Browse files Browse the repository at this point in the history
Closes #204
  • Loading branch information
grote committed Jul 1, 2016
1 parent 4ac378c commit a0617c3
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
language: android
before_script: ./pre-build.sh && sed -i "s#gradle:2.1.0#gradle:1.5.0#" build.gradle
before_script: ./pre-build.sh && sed -i "s#gradle:2.1.2#gradle:1.5.0#" build.gradle
jdk: openjdk7
android:
components:
- tools
- build-tools-23.0.2
- android-23
- android-24
- extra-android-m2repository
script: gradle build connectedCheck -PbuildServer

5 changes: 5 additions & 0 deletions res/xml/changelog_master.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<changelog>

<release version="1.1.3" versioncode="37">
<change>Remember selected means of transports for each network (Thanks kas70!)</change>
<change>Prevent crash when turning screen during trip search</change>
</release>

<release version="1.1.2" versioncode="36">
<change>New product icons that are now shown for all lines</change>
<change>Add button to map that shows current position and follows it</change>
Expand Down
5 changes: 5 additions & 0 deletions src/de/grobox/liberario/fragments/DirectionsFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,11 @@ public boolean onOptionsItemSelected(MenuItem item) {

@Override
public void onTripRetrieved(QueryTripsResult result) {
if(getContext() == null) {
// FIXME: This is not a proper solution, we need to use a loader instead
return;
}

if(result.status == QueryTripsResult.Status.OK && result.trips != null && result.trips.size() > 0) {
Log.d(getClass().getSimpleName(), result.toString());

Expand Down

0 comments on commit a0617c3

Please sign in to comment.