OSDN Git Service

Correct problem with tag tree reloading incorrectly after a sync.
[neighbornote/NeighborNote.git] / src / cx / fbn / nevernote / gui / BrowserWindow.java
index 23264d8..5b033ae 100644 (file)
@@ -2112,8 +2112,8 @@ public class BrowserWindow extends QWidget {
                                        titleLabel.blockSignals(false);\r
                                }\r
                        }\r
-                       noteSignal.titleChanged.emit(currentNote.getGuid(), titleLabel\r
-                                       .text());\r
+                       if (currentNote != null && titleLabel != null)\r
+                               noteSignal.titleChanged.emit(currentNote.getGuid(), titleLabel.text());\r
                }\r
        }\r
 \r
@@ -3394,7 +3394,8 @@ public class BrowserWindow extends QWidget {
                QByteArray data = new QByteArray(sourceEditHeader+content+"</body></html>");\r
                getBrowser().setContent(data);\r
                checkNoteTitle();\r
-               noteSignal.noteChanged.emit(currentNote.getGuid(), sourceEdit.toPlainText()); \r
+               if (currentNote != null && sourceEdit != null)\r
+                       noteSignal.noteChanged.emit(currentNote.getGuid(), sourceEdit.toPlainText()); \r
        }\r
        \r
        private void setSource(String text) {\r