aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2017-03-27 11:37:11 -0400
committerKen Moore <ken@ixsystems.com>2017-03-27 11:37:11 -0400
commit19d07e5f591338ee3dc7f1f74195c2b13d501893 (patch)
tree177d981b8c20cd471f2ea80c4f3727cda71c7e1b
parentRemove the alpha channel from the alternate base color for lumina-glass - bas... (diff)
downloadlumina-19d07e5f591338ee3dc7f1f74195c2b13d501893.tar.gz
lumina-19d07e5f591338ee3dc7f1f74195c2b13d501893.tar.bz2
lumina-19d07e5f591338ee3dc7f1f74195c2b13d501893.zip
Fix a possible issue where the panel number would be negative - causing a crash of lumina-config.
Fixes #402
-rw-r--r--src-qt5/core-utils/lumina-config/pages/page_interface_panels.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src-qt5/core-utils/lumina-config/pages/page_interface_panels.cpp b/src-qt5/core-utils/lumina-config/pages/page_interface_panels.cpp
index 45fd8913..8ab9b093 100644
--- a/src-qt5/core-utils/lumina-config/pages/page_interface_panels.cpp
+++ b/src-qt5/core-utils/lumina-config/pages/page_interface_panels.cpp
@@ -59,7 +59,8 @@ void page_interface_panels::LoadSettings(int screennum){
QString screenID = QApplication::screens().at(cscreen)->name();
QString DPrefix = "desktop-"+screenID+"/";
int panelnumber = settings->value(DPrefix+"panels",-1).toInt();
- QBoxLayout *panels_layout = static_cast<QHBoxLayout*>(ui->scroll_panels->widget()->layout());
+ if(panelnumber<0){ panelnumber = 0; }
+ QHBoxLayout *panels_layout = static_cast<QHBoxLayout*>(ui->scroll_panels->widget()->layout());
//Remove extra panels (if any)
for(int i=panelnumber; i<PANELS.length(); i++){
bgstack15