[Kst] extragear/graphics/kst/src/kst

George Staikos staikos at kde.org
Tue May 8 15:46:44 CEST 2007


SVN commit 662516 by staikos:

Another case of variable declarations in the wrong place causing subtle bugs.
If the object lives beyond the scope it was supposed to be in we end up with
an object destruction order problem.
BUG: 145050


 M  +1 -2      main.cpp  


--- trunk/extragear/graphics/kst/src/kst/main.cpp #662515:662516
@@ -382,7 +382,6 @@
     KstApp *kst = new KstApp;
     InType in;
     QColor color;
-    KstDataSourcePtr file;
     QCStringList ycolList;
     QCStringList matrixList;
     QCStringList yEqList;
@@ -514,7 +513,7 @@
         } else {
           fullPath = args->arg(i_file);
         }
-        file = KstDataSource::loadSource(fullPath);
+        KstDataSourcePtr file = KstDataSource::loadSource(fullPath);
         if (file) {
           if (!file->isValid() || file->isEmpty()) {
             kstdError() << i18n("No data in file %1.  Trying to continue...").arg(args->arg(i_file)) << endl;


More information about the Kst mailing list