Commit db514555 authored by Nathan Lee's avatar Nathan Lee

Make CLI pdf use the same import method every time

Initialises some values caught by valgrind. Should
fix #1248
and #1249

(cherry-picked from 6ec3b62e)
parent 5bfb6a1b
......@@ -787,7 +787,7 @@ PdfInput::open(::Inkscape::Extension::Input * /*mod*/, const gchar * uri) {
// Apply crop settings
_POPPLER_CONST PDFRectangle *clipToBox = nullptr;
double crop_setting;
double crop_setting = -1.0;
sp_repr_get_double(prefs, "cropTo", &crop_setting);
Catalog *catalog = pdf_doc->getCatalog();
......@@ -823,7 +823,7 @@ PdfInput::open(::Inkscape::Extension::Input * /*mod*/, const gchar * uri) {
page->getResourceDict(), page->getCropBox(), clipToBox);
// Set up approximation precision for parser. Used for converting Mesh Gradients into tiles.
double color_delta;
double color_delta = 2.0;
sp_repr_get_double(prefs, "approximationPrecision", &color_delta);
if ( color_delta <= 0.0 ) {
color_delta = 1.0 / 2.0;
......
......@@ -195,12 +195,6 @@ Application::instance()
*/
Application::Application(bool use_gui) :
_menus(nullptr),
_desktops(nullptr),
refCount(1),
_dialogs_toggle(TRUE),
_mapalt(GDK_MOD1_MASK),
_trackalt(FALSE),
_use_gui(use_gui)
{
using namespace Inkscape::IO::Resource;
......
......@@ -217,19 +217,19 @@ public:
Application& operator=(Application const&); // no assign
Application* operator&() const; // no pointer access
Inkscape::XML::Document * _menus;
Inkscape::XML::Document *_menus = nullptr;
std::map<SPDocument *, int> _document_set;
std::map<SPDocument *, AppSelectionModel *> _selection_models;
std::vector<SPDesktop *> * _desktops;
std::vector<SPDesktop *> *_desktops = nullptr;
unsigned refCount;
bool _dialogs_toggle;
guint _mapalt;
guint _trackalt;
unsigned refCount = 1;
bool _dialogs_toggle = true;
guint _mapalt = GDK_MOD1_MASK;
guint _trackalt = false;
static bool _crashIsHappening;
bool _use_gui;
gint _pdf_page;
bool _pdf_poppler;
bool _use_gui = false;
gint _pdf_page = 1;
bool _pdf_poppler = false;
};
} // namespace Inkscape
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment