If you pass in the empty string to gfx_measurestr(), then neither of the dimension variables change.
Code:
text_w = text_h = 100;
gfx_measurestr("", text_w, text_h);
// text_w == 100 && text_h == 100
I don't know what values they should have (0?) but remaining unchanged caused me a bit of trouble.
I'm on Windows 10 (REAPER v5.23/x64 rev 207a2c).