diff --git a/pages/History.qml b/pages/History.qml
index 85aec79f..2a1eca7f 100644
--- a/pages/History.qml
+++ b/pages/History.qml
@@ -48,7 +48,7 @@ Rectangle {
     color: "#F0EEEE"
 
     function getSelectedAmount() {
-      if (typeof model === 'undefined')
+      if (typeof model === 'undefined' || model == null)
         return ""
       var total = 0
       var count = model.rowCount()