[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kdevplatform] plugins/filetemplates: Do not crash if newly created file (from template) is not adde
From:       Alexander Dymo <adymo () kdevelop ! org>
Date:       2012-10-26 13:05:11
Message-ID: 20121026130511.08726A6078 () git ! kde ! org
[Download RAW message or body]

Git commit 6be7300a3ad821446192d556f0309a5776f6bfea by Alexander Dymo.
Committed on 26/10/2012 at 14:53.
Pushed by dymo into branch 'master'.

Do not crash if newly created file (from template) is not added to the targ=
et

M  +5    -0    plugins/filetemplates/templateclassassistant.cpp

http://commits.kde.org/kdevplatform/6be7300a3ad821446192d556f0309a5776f6bfea

diff --git a/plugins/filetemplates/templateclassassistant.cpp b/plugins/fil=
etemplates/templateclassassistant.cpp
index 0f83c1b..353730f 100644
--- a/plugins/filetemplates/templateclassassistant.cpp
+++ b/plugins/filetemplates/templateclassassistant.cpp
@@ -220,8 +220,13 @@ void TemplateClassAssistantPrivate::addFilesToTarget (=
const QHash< QString, KUrl
             else
             {
                 kDebug() << "Did not select anything, not adding to a targ=
et";
+                return;
             }
         }
+        else {
+            kDebug() << "Canceled select target dialog, not adding to a ta=
rget";
+            return;
+        }
     }
     else
     {
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic