text: Be more careful with cached layouts

If we call any functions that may call ensure_layout
themeselves, we risk having the cached layout pulled
out from underneath. Better play it safe and take a
reference.
9 jobs for matthiasc/for-master in 30 minutes and 7 seconds (queued for 1 second)
Status Job ID Name Coverage
  .Pre
failed #669076
allowed to fail
style-check-diff

00:02:36

 
  Build
passed #669077
fedora-x86_64

00:06:52

passed #669079
win32
msys2-mingw32

00:05:12

passed #669078
release-build

00:07:34

 
  Analysis
passed #669080
static-scan

00:13:34

 
  Docs
passed #669081
reference

00:06:20

 
  Flatpak
manual #669082
flatpak allowed to fail manual
flatpak-manual:demo
manual #669084
flatpak allowed to fail manual
flatpak-manual:icon-browser
manual #669083
flatpak allowed to fail manual
flatpak-manual:widget-factory
 
Name Stage Failure
failed
style-check-diff .Pre
             const GLogField *fields,
- gsize n_fields,
- gpointer user_data)
+ gsize n_fields,
+ gpointer user_data)
{
#ifndef G_OS_WIN32
if (log_level & G_LOG_LEVEL_CRITICAL)
ERROR: Job failed: exit code 1