Author: mir3x
Date: Wed Dec 28 21:14:15 2016
New Revision: 34745

URL: http://svn.gna.org/viewcvs/freeciv?rev=34745&view=rev
Log:
Qt client - fixed crash when applying font options

See bug #25402


Modified:
    branches/S2_6/client/gui-qt/optiondlg.cpp

Modified: branches/S2_6/client/gui-qt/optiondlg.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-qt/optiondlg.cpp?rev=34745&r1=34744&r2=34745&view=diff
==============================================================================
--- branches/S2_6/client/gui-qt/optiondlg.cpp   (original)
+++ branches/S2_6/client/gui-qt/optiondlg.cpp   Wed Dec 28 21:14:15 2016
@@ -337,8 +337,11 @@
   fp->fromString(s);
   qp = reinterpret_cast<QPushButton *>(option_get_gui_data(poption));
   ql = s.split(",");
-  qp->setText(ql[0] + " " + ql[1]);
+  if (s.isEmpty() == false) {
+    qp->setText(ql[0] + " " + ql[1]);
+  }
   qp->setFont(*fp);
+
 }
 
 


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to