summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core.cpp5
-rw-r--r--src/display.cpp5
-rw-r--r--src/metadata.cpp2
-rw-r--r--src/plugin.cpp3
-rw-r--r--src/screen.cpp3
5 files changed, 9 insertions, 9 deletions
diff --git a/src/core.cpp b/src/core.cpp
index 51a90dc..be433d5 100644
--- a/src/core.cpp
+++ b/src/core.cpp
@@ -104,10 +104,7 @@ CompCore::~CompCore ()
CompPlugin *p;
while (!priv->displays.empty ())
- {
removeDisplay (priv->displays.front ());
- priv->displays.pop_front ();
- }
if (priv->watchPollFds)
free (priv->watchPollFds);
@@ -527,7 +524,7 @@ CoreInterface::sessionEvent (CompSession::Event event,
PrivateCore::PrivateCore (CompCore *core) :
core (core),
- displays (0),
+ displays (),
fileWatch (0),
lastFileWatchHandle (1),
timers (0),
diff --git a/src/display.cpp b/src/display.cpp
index 0a842bd..259f4a9 100644
--- a/src/display.cpp
+++ b/src/display.cpp
@@ -725,10 +725,7 @@ CompDisplay::CompDisplay () :
CompDisplay::~CompDisplay ()
{
while (!priv->screens.empty ())
- {
removeScreen (priv->screens.front ());
- priv->screens.pop_front ();
- }
CompPlugin::objectFiniPlugins (this);
@@ -2473,7 +2470,7 @@ DisplayInterface::logMessage (const char *componentName,
PrivateDisplay::PrivateDisplay (CompDisplay *display) :
display (display),
- screens (0),
+ screens (),
watchFdHandle (0),
screenInfo (0),
textureFilter (GL_LINEAR),
diff --git a/src/metadata.cpp b/src/metadata.cpp
index 7b63efb..5859e1c 100644
--- a/src/metadata.cpp
+++ b/src/metadata.cpp
@@ -1156,7 +1156,7 @@ CompMetadata::getStringFromPath (CompString path)
CompString v = "";
if (!initXPathFromMetadataPath (&xPath, this, BAD_CAST path.c_str ()))
- return NULL;
+ return "";
xPath.obj = xmlXPathConvertString (xPath.obj);
diff --git a/src/plugin.cpp b/src/plugin.cpp
index 8a22f14..c47ec80 100644
--- a/src/plugin.cpp
+++ b/src/plugin.cpp
@@ -534,6 +534,9 @@ CompPlugin::push (CompPlugin *p)
CompPlugin *
CompPlugin::pop (void)
{
+ if (plugins.empty ())
+ return NULL;
+
CompPlugin *p = plugins.front ();
if (!p)
diff --git a/src/screen.cpp b/src/screen.cpp
index 1511425..3ab9312 100644
--- a/src/screen.cpp
+++ b/src/screen.cpp
@@ -2437,6 +2437,9 @@ CompScreen::findTopLevelWindow (Window id)
void
CompScreen::insertWindow (CompWindow *w, Window aboveId)
{
+ w->prev = NULL;
+ w->next = NULL;
+
if (!aboveId || priv->windows.empty ())
{
if (!priv->windows.empty ())