summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'kde-base/nepomuk-core/files/nepomuk-core-4.9.2-dirwatch-null.patch')
-rw-r--r--kde-base/nepomuk-core/files/nepomuk-core-4.9.2-dirwatch-null.patch44
1 files changed, 44 insertions, 0 deletions
diff --git a/kde-base/nepomuk-core/files/nepomuk-core-4.9.2-dirwatch-null.patch b/kde-base/nepomuk-core/files/nepomuk-core-4.9.2-dirwatch-null.patch
new file mode 100644
index 000000000000..fb08140536bf
--- /dev/null
+++ b/kde-base/nepomuk-core/files/nepomuk-core-4.9.2-dirwatch-null.patch
@@ -0,0 +1,44 @@
+commit 32b44881dda4f243932c59c11bf39c91f30c224b
+Author: Dan Vrátil <dvratil@redhat.com>
+Date: Wed Oct 3 13:27:22 2012 +0200
+
+ Add null-crash guards for m_dirWatch to FileWatch
+
+ BUG: 307388
+
+diff --git a/services/filewatch/nepomukfilewatch.cpp b/services/filewatch/nepomukfilewatch.cpp
+index 94db504..83045da 100644
+--- a/services/filewatch/nepomukfilewatch.cpp
++++ b/services/filewatch/nepomukfilewatch.cpp
+@@ -114,6 +114,7 @@ namespace {
+
+ Nepomuk2::FileWatch::FileWatch( QObject* parent, const QList<QVariant>& )
+ : Service( parent )
++ , m_dirWatch( 0 )
+ {
+ // Create the configuration instance singleton (for thread-safety)
+ // ==============================================================
+@@ -324,8 +325,10 @@ void Nepomuk2::FileWatch::slotInotifyWatchUserLimitReached()
+ {
+ // we do it the brutal way for now hoping with new kernels and defaults this will never happen
+ // Delete the KInotify and switch to KDirNotify dbus signals
+- m_dirWatch->deleteLater();
+- m_dirWatch = 0;
++ if( m_dirWatch ) {
++ m_dirWatch->deleteLater();
++ m_dirWatch = 0;
++ }
+ connectToKDirWatch();
+ }
+ #endif
+@@ -413,7 +416,9 @@ void Nepomuk2::FileWatch::slotDeviceMounted(const Nepomuk2::RemovableMediaCache:
+ void Nepomuk2::FileWatch::slotDeviceTeardownRequested(const Nepomuk2::RemovableMediaCache::Entry* entry )
+ {
+ #ifdef BUILD_KINOTIFY
+- m_dirWatch->removeWatch( entry->mountPath() );
++ if( m_dirWatch ) {
++ m_dirWatch->removeWatch( entry->mountPath() );
++ }
+ #endif
+ }
+