summaryrefslogtreecommitdiff
path: root/src/plugin.cpp
diff options
context:
space:
mode:
authorSam Spilsbury <smspillaz@gmail.com>2010-12-31 14:39:11 +0800
committerSam Spilsbury <smspillaz@gmail.com>2010-12-31 14:40:06 +0800
commit92345bffbe2c0fe792dfa78ec230ac9114500efd (patch)
treef9e5094949d36fcea4a493c573270007be353bac /src/plugin.cpp
parentb2638abc484acdb9f2395e640b814f57a1d6e1e0 (diff)
downloadmobileperf-92345bffbe2c0fe792dfa78ec230ac9114500efd.tar.gz
mobileperf-92345bffbe2c0fe792dfa78ec230ac9114500efd.tar.bz2
Fix crashes when loading plugins on the command line
plugin.cpp:plugins is a reverse list, so iterate it in reverse
Diffstat (limited to 'src/plugin.cpp')
-rw-r--r--src/plugin.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugin.cpp b/src/plugin.cpp
index dd5bc7e8..7aff05f 100644
--- a/src/plugin.cpp
+++ b/src/plugin.cpp
@@ -351,11 +351,12 @@ CompScreen::finiPluginForScreen (CompPlugin *p)
bool
CompPlugin::screenInitPlugins (CompScreen *s)
{
- CompPlugin::List::iterator it = plugins.begin ();
+ CompPlugin::List::reverse_iterator it = plugins.rbegin ();
CompPlugin *p = NULL;
- while (it != plugins.end ())
+ /* Plugins is a btf list, so iterate it in reverse */
+ while (it != plugins.rend ())
{
p = (*it);