Ignore:
Timestamp:
2011-06-28T08:17:37+02:00 (13 years ago)
Author:
jttt
Message:

Fix #6519 NPE after opening offline osm file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/QuadBuckets.java

    r3719 r4178  
    731731            // search spot can not cover the current
    732732            // search
    733             while (!search_cache.bbox().bounds(search_bbox)) {
     733            while (search_cache != null && !search_cache.bbox().bounds(search_bbox)) {
    734734                if (debug) {
    735735                    out("bbox: " + search_bbox);
     
    743743                    out("new search_cache: " + search_cache);
    744744                }
     745            }
     746
     747            if (search_cache == null) {
     748                search_cache = root;
     749                out("bbox: " + search_bbox + " is out of the world");
    745750            }
    746751        } else {
Note: See TracChangeset for help on using the changeset viewer.