Author: mir3x
Date: Wed Dec 28 21:14:24 2016
New Revision: 34746
URL: http://svn.gna.org/viewcvs/freeciv?rev=34746&view=rev
Log:
Qt client - fixed crash when applying font options
See bug #25402
Modified:
trunk/client/gui-qt/optiondlg.cpp
Modified: trunk/client/gui-qt/optiondlg.cpp
URL:
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/optiondlg.cpp?rev=34746&r1=34745&r2=34746&view=diff
==============================================================================
--- trunk/client/gui-qt/optiondlg.cpp (original)
+++ trunk/client/gui-qt/optiondlg.cpp Wed Dec 28 21:14:24 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
[email protected]
https://mail.gna.org/listinfo/freeciv-commits