QTfrontend/ui/page/pagemain.cpp
changeset 9852 0a5ec79af0a2
parent 9846 4dc7cb571e1d
child 9950 2759212a27de
child 9998 736015b847e3
--- a/QTfrontend/ui/page/pagemain.cpp	Tue Dec 24 18:39:23 2013 -0500
+++ b/QTfrontend/ui/page/pagemain.cpp	Wed Dec 25 11:52:09 2013 +0400
@@ -158,7 +158,7 @@
 #else
     int platform = 3;
 #endif
-    if(Tips.length() == 0)
+    if(!Tips.length())
     {
         DataManager & dataMgr = DataManager::instance();
 
@@ -209,7 +209,11 @@
 
         file.close();
     }
-    return Tips[QTime(0, 0, 0).secsTo(QTime::currentTime()) % Tips.length()];
+    
+    if(Tips.length())
+        return Tips[QTime(0, 0, 0).secsTo(QTime::currentTime()) % Tips.length()];
+    else
+        return QString();
 }
 
 void PageMain::toggleNetworkChoice()