[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: PATCH for KTip
From: Joachim Ansorg <jansorg () gmx ! de>
Date: 2000-09-30 21:25:17
[Download RAW message or body]
Hi!
Here's a very small patch for KTip (in kdebase).
It's required because if tips.count() is 0 a "division by zero" crash will
occur.
I experienced crashes with wrong permissions (tipfile can't be read).
Maybe a message should appear if no tips were found, but that's not my
decision.
Here's the patch:
--- ktipwindow.cpp~ Thu Sep 28 23:08:30 2000
+++ ktipwindow.cpp Sat Sep 30 22:44:39 2000
@@ -106,7 +106,7 @@
loadTips();
- current = kapp->random() % tips.count();
+ current = (kapp->random() % tips.count()) ? (tips.count() != 0) : (current
= 0);
KConfig *config = new KConfig("kdewizardrc", true);
config->setGroup("General");
--Joachim
>> Visit http://master.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic