summaryrefslogtreecommitdiffstats
path: root/kresources/caldav
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-08-24 19:33:28 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-08-24 19:33:28 +0000
commitc437f19f371b5678e0772a5f922fc3587864ca4e (patch)
treeab33a9046cd22c2ee69172eac02aa63d2ab7a3a1 /kresources/caldav
parent90fb05e4f85dccfda4a6fb0b970f6f5c9f4b67d1 (diff)
downloadtdepim-c437f19f371b5678e0772a5f922fc3587864ca4e.tar.gz
tdepim-c437f19f371b5678e0772a5f922fc3587864ca4e.zip
Fixed CalDAV crash when event editor left open during automatic reload
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1167492 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kresources/caldav')
-rw-r--r--kresources/caldav/Makefile.am2
-rw-r--r--kresources/caldav/resource.cpp4
2 files changed, 5 insertions, 1 deletions
diff --git a/kresources/caldav/Makefile.am b/kresources/caldav/Makefile.am
index 45c0f2c7c..604976cd7 100644
--- a/kresources/caldav/Makefile.am
+++ b/kresources/caldav/Makefile.am
@@ -15,7 +15,7 @@ libkcal_caldav_la_LDFLAGS = $(KDE_RPATH) $(all_libraries) \
libkcal_caldav_la_LIBADD = \
$(top_builddir)/libkcal/libkcal.la \
$(top_builddir)/libkdepim/libkdepim.la \
- -lcaldav
+ -lcaldav -lkorganizer
libkcal_caldav_la_COMPILE_FIRST = prefsskel.h
kde_module_LTLIBRARIES = kcal_caldav.la
diff --git a/kresources/caldav/resource.cpp b/kresources/caldav/resource.cpp
index 4e1542029..58ea5838e 100644
--- a/kresources/caldav/resource.cpp
+++ b/kresources/caldav/resource.cpp
@@ -38,6 +38,7 @@
#include "resource.h"
#include "reader.h"
#include "writer.h"
+#include <korganizer/kocore.h>
/*=========================================================================
| NAMESPACE
@@ -143,6 +144,9 @@ bool ResourceCalDav::isSaving() {
bool ResourceCalDav::doLoad() {
bool syncCache = true;
+ // Make sure no editor windows are open
+ if (KOCore::self()->editorWindowOpen() == true) return true;
+
if ((mLoadingQueueReady == false) || (mLoadingQueue.isEmpty() == false) || (mLoader->running() == true) || (isSaving() == true)) {
return true; // Silently fail; the user has obviously not responded to a dialog and we don't need to pop up more of them!
}