]> git.lyx.org Git - lyx.git/blobdiff - src/graphics/GraphicsImageXPM.C
if we can load direct without conversion, then do that.
[lyx.git] / src / graphics / GraphicsImageXPM.C
index 592586a1a3377ee15fc91ff16b8b19358e948bd2..fb6df44881aa93f8f4ed41a526afc610e6587191 100644 (file)
@@ -17,7 +17,7 @@
 #include "GraphicsParams.h"
 #include "ColorHandler.h"
 #include "debug.h"
-#include "frontends/GUIRunTime.h" // x11Display
+#include "frontends/GUIRunTime.h" // x11Display, x11Screen
 #include "support/filetools.h"    // IsFileReadable
 #include "support/lstrings.h"
 #include "Lsstream.h"
@@ -54,14 +54,14 @@ GImageXPM::GImageXPM()
 GImageXPM::GImageXPM(GImageXPM const & other)
        : GImage(other),
          image_(other.image_),
-         pixmap_(other.pixmap_),
-         pixmap_status_(other.pixmap_status_)
+         pixmap_(0),
+         pixmap_status_(PIXMAP_UNINITIALISED)
 {}
 
 
 GImageXPM::~GImageXPM()
 {
-       if (pixmap_ && pixmap_status_ == PIXMAP_SUCCESS)
+       if (pixmap_)
                XFreePixmap(GUIRunTime::x11Display(), pixmap_);
 }