]> git.lyx.org Git - lyx.git/commitdiff
Amend 28be7d55 to avoid an exception
authorEnrico Forestieri <forenr@lyx.org>
Mon, 26 Jun 2017 22:09:51 +0000 (00:09 +0200)
committerEnrico Forestieri <forenr@lyx.org>
Mon, 26 Jun 2017 22:09:51 +0000 (00:09 +0200)
This was occurring during validation when trying to enter the
language name in the advanced tab.

src/insets/InsetListingsParams.cpp

index 0daf4081852867bedbc9aeba46f222c4dbc0c269..503200d87b6848748c6e347c1ae3b167049488ee 100644 (file)
@@ -1050,8 +1050,8 @@ void InsetListingsParams::addParam(string const & key,
        if (key.empty())
                return;
 
-       string const value = (minted() && key == "language") ? languageonly(val)
-                                                            : val;
+       string const value = (minted() && key == "language" && !val.empty())
+                               ? languageonly(val) : val;
        // duplicate parameters!
        string keyname = key;
        if (!replace && hasParam(key))