Ignore:
Timestamp:
2010-10-23T21:25:26+02:00 (14 years ago)
Author:
jttt
Message:

Fix #5571 Exception was raised when attempting to split a way

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/MapStatus.java

    r3594 r3629  
    171171                    // access to the data need to be restarted, if the main thread modifies
    172172                    // the data.
     173                    DataSet ds = null;
    173174                    try {
     175                        ds = mv.getCurrentDataSet();
     176                        if (ds != null) {
     177                            // This is not perfect, if current dataset was changed during execution, the lock would be useless
     178                            ds.getReadLock().lock();
     179                        }
     180
    174181                        // Set the text label in the bottom status bar
    175182                        statusBarElementUpdate(ms);
     
    237244                    } catch (NullPointerException x) {
    238245                        //x.printStackTrace();
     246                    } finally {
     247                        if (ds != null) {
     248                            ds.getReadLock().unlock();
     249                        }
    239250                    }
    240251                }
Note: See TracChangeset for help on using the changeset viewer.