1
0
Fork 0

Fix crash on Ctrl-V in PUI

This commit is contained in:
James Turner 2018-10-23 11:00:40 +01:00
parent 49c3fc064a
commit 196aa472fb

View file

@ -60,6 +60,8 @@ using namespace flightgear;
puFont guiFnt = 0;
// this is declared in puLocal.h, re-declare here so we can call it ourselves
void puSetPasteBuffer ( const char *ch ) ;
/* -------------------------------------------------------------------------
init the gui
@ -80,6 +82,10 @@ public:
puSetDefaultStyle ( PUSTYLE_SMALL_SHADED ); //PUSTYLE_DEFAULT
puSetDefaultColourScheme (0.8, 0.8, 0.9, 1);
// ensure we set a non-NULL paste buffer so Ctrl-V doesn't crash us,
// with older versions of PLIB (pre 1.8.6)
puSetPasteBuffer(" ");
// OSG Texture2D sets this, which breaks PLIB fntLoadTXF
// force it back to zero so width passed to glTexImage2D is used
glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);