Menu

#183 Fix crashes, while loading empty rule sets

open
nobody
None
9
2009-01-22
2008-10-31
No

Both qtstalker-CVS and qtstalker-qt4-branch crash while loading empty Back Tracking Rule sets.

How to Repeat:
Create a new rule set, just apply or save it and close the Back Tester dialog, open or double click on the name of this new rule set.

Remedy:
Plz see the patch attached herewith, though this patch contains some other improvements also which you may ignore, but here is the important part to avoid the crashes --

@@ -296,7 +302,13 @@ void Tester::loadRule ()

if (! l2[0].compare("Symbol"))
{
- testPage->setSymbol(l2[1]);
+ if (l2.size() > 1)
+ testPage->setSymbol(l2[1]);
+ else {
+ config.getData(Config::Home, s);
+ s.append("/data/Stocks");
+ testPage->setSymbol(s);
+ }
continue;
}

Hope that helps,

Discussion

  • Balwinder S Dheeman

    unified diff against CVS head src/Tester.cpp

     
  • Balwinder S Dheeman

    • priority: 5 --> 9