]> git.lyx.org Git - features.git/commitdiff
Initialize a member variable before it is used
authorScott Kostyshak <skostysh@lyx.org>
Sat, 1 Oct 2016 03:21:45 +0000 (23:21 -0400)
committerScott Kostyshak <skostysh@lyx.org>
Sat, 1 Oct 2016 03:27:13 +0000 (23:27 -0400)
Valgrind spotted a conditional jump depending on an uninitialised
value.

Thanks to Pavel for the help. For more information, see:
https://www.mail-archive.com/search?l=mid&q=20160928204810.e5ylny3raa7jgmgw%40Opti1604

src/Buffer.cpp

index a66988b48a4d9a7a4a803380bd90880029d08872..99641e278c5af05157316f3208703c269dda8d69 100644 (file)
@@ -420,8 +420,8 @@ Buffer::Impl::Impl(Buffer * owner, FileName const & file, bool readonly_,
          file_fully_loaded(false), file_format(LYX_FORMAT), need_format_backup(false),
          ignore_parent(false),  toc_backend(owner), macro_lock(false), timestamp_(0),
          checksum_(0), wa_(0),  gui_(0), undo_(*owner), bibinfo_cache_valid_(false),
-         bibfile_cache_valid_(false), cite_labels_valid_(false), inset(0),
-         preview_loader_(0), cloned_buffer_(cloned_buffer), clone_list_(0),
+         bibfile_cache_valid_(false), cite_labels_valid_(false), preview_error_(false),
+         inset(0), preview_loader_(0), cloned_buffer_(cloned_buffer), clone_list_(0),
          doing_export(false), parent_buffer(0),
          word_count_(0), char_count_(0), blank_count_(0)
 {