summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mobile-widgets/qmlmanager.cpp4
-rw-r--r--mobile-widgets/qmlmanager.h2
2 files changed, 5 insertions, 1 deletions
diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp
index 573517e70..9124434e0 100644
--- a/mobile-widgets/qmlmanager.cpp
+++ b/mobile-widgets/qmlmanager.cpp
@@ -1346,6 +1346,10 @@ void QMLManager::pasteDiveData(int id)
appendTextToLog("trying to paste to non-existing dive");
return;
}
+ if (!m_copyPasteDive) {
+ appendTextToLog("dive to paste is not selected");
+ return;
+ }
selective_copy_dive(m_copyPasteDive, d, what, false);
changesNeedSaving();
}
diff --git a/mobile-widgets/qmlmanager.h b/mobile-widgets/qmlmanager.h
index ca638e02c..1f2790854 100644
--- a/mobile-widgets/qmlmanager.h
+++ b/mobile-widgets/qmlmanager.h
@@ -226,7 +226,7 @@ private:
bool m_btEnabled;
void updateAllGlobalLists();
QString m_pluggedInDeviceName;
- struct dive *m_copyPasteDive;
+ struct dive *m_copyPasteDive = NULL;
struct dive_components what;
#if defined(Q_OS_ANDROID) || defined(Q_OS_IOS)