]> git.lyx.org Git - lyx.git/commitdiff
~Buffer: Move wa_ destruction to Buffer::~Impl()
authorAbdelrazak Younes <younes@lyx.org>
Fri, 30 Nov 2007 20:30:09 +0000 (20:30 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Fri, 30 Nov 2007 20:30:09 +0000 (20:30 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21883 a592a061-630c-0410-9148-cb99ea01b6c8

src/Buffer.cpp

index 8955a448dc722d3bb2ef0ddd9876bb58228ae2b6..d83b3a65149db7da908e546242e331f63d7f89d4 100644 (file)
@@ -163,6 +163,14 @@ class Buffer::Impl
 {
 public:
        Impl(Buffer & parent, FileName const & file, bool readonly);
+
+       ~Impl()
+       {
+               if (wa_) {
+                       wa_->closeAll();
+                       delete wa_;
+               }
+       }
        
        BufferParams params;
        LyXVC lyxvc;
@@ -273,12 +281,6 @@ Buffer::~Buffer()
 
        // Remove any previewed LaTeX snippets associated with this buffer.
        graphics::Previews::get().removeLoader(*this);
-
-       if (d->wa_) {
-               d->wa_->closeAll();
-               delete d->wa_;
-       }
-       delete d;
 }