X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FBranchList.cpp;h=7cb23ef5b499db62d99f25f3e99256c8cdef43cb;hb=1e190a2af27ca99831f51567c16e6b39bf4317c3;hp=1277be23281a956a7d1dfe28314504ad0fac5655;hpb=e5ce07206c092fb1f3c484251d81055f0a9b5219;p=lyx.git diff --git a/src/BranchList.cpp b/src/BranchList.cpp index 1277be2328..7cb23ef5b4 100644 --- a/src/BranchList.cpp +++ b/src/BranchList.cpp @@ -48,6 +48,8 @@ Branch::Branch() // no theApp() with command line export if (theApp()) theApp()->getRgbColor(Color_background, color_); + else + frontend::Application::getRgbColorUncached(Color_background, color_); } @@ -106,9 +108,14 @@ void Branch::setColor(string const & str) { if (str.size() == 7 && str[0] == '#') color_ = rgbFromHexName(str); - else + else { // no color set or invalid color - use normal background - theApp()->getRgbColor(Color_background, color_); + // no theApp() with command line export + if (theApp()) + theApp()->getRgbColor(Color_background, color_); + else + frontend::Application::getRgbColorUncached(Color_background, color_); + } }