[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdelibs/interfaces/kscript
From: John Tapsell <john () geola ! co ! uk>
Date: 2005-01-15 19:31:43
Message-ID: 20050115193143.0F8681D009 () office ! kde ! org
[Download RAW message or body]
CVS commit by johnflux:
Don't crash if told to run a script that doesn't exist.
M +4 -0 scriptmanager.cpp 1.18
--- kdelibs/interfaces/kscript/scriptmanager.cpp #1.17:1.18
@@ -85,4 +85,8 @@ void KScriptManager::runScript( const QS
{
ScriptInfo *newScript = m_scripts[scriptName];
+ if(!newScript) {
+ KMessageBox::sorry(0, i18n("Script %1 not found.").arg(scriptName), \
i18n("KScript Error")); + return;
+ }
QString scriptType = "([X-KDE-Script-Runner] == '" + newScript->scriptType + \
"')"; kdDebug()<<"running script, type = '"<<scriptType<<"'"<<endl;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic