From 8c27ea2086779ccb1b0607c2b375a2d8cebc4198 Mon Sep 17 00:00:00 2001 From: leo Date: Wed, 21 Nov 2012 21:51:30 +0000 Subject: [PATCH] Allow the program to start without a library. --- common/lc_application.cpp | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/common/lc_application.cpp b/common/lc_application.cpp index 8ab016fb..613fb0a3 100644 --- a/common/lc_application.cpp +++ b/common/lc_application.cpp @@ -93,10 +93,6 @@ bool lcApplication::LoadPiecesLibrary(const char* LibPath, const char* LibraryIn } } - lcLoadDefaultColors(); - - SystemDoMessageBox("Cannot load pieces library.", LC_MB_OK | LC_MB_ICONERROR); - return false; } @@ -238,7 +234,18 @@ bool lcApplication::Initialize(int argc, char* argv[], const char* LibraryInstal return false; if (!LoadPiecesLibrary(LibPath, LibraryInstallPath, LibraryCachePath)) - return false; + { + if (SaveImage) + { + fprintf(stderr, "Cannot load pieces library."); + return false; + } + + lcLoadDefaultColors(); + m_Library->CreatePlaceholder("EMPTY"); + + SystemDoMessageBox("Cannot load pieces library.", LC_MB_OK | LC_MB_ICONERROR); + } SystemInit();