Repository: godot
Issue: Executing `LightmapGIData._get_light_textures_data` crashes Godot
Labels: bug,topic:rendering,crash,topic:3d

### Godot version

4.0.alpha.custom_build. 4b164b8e4

### System information

Ubuntu 22.04 - Nvidia GTX 970, Gnome shell 42 X11

### Issue description

Ubuntu 22.04 - Nvidia GTX 970, Gnome shell 42 X11

**Issue description:**
When executing
```
	var temp_variable7827 = LightmapGIData.new()
	temp_variable7827.set_light_texture(PlaceholderTexture2DArray.new())
	temp_variable7827._get_light_textures_data()
```

Godot crashes with this backtrace
```
scene/3d/lightmap_gi.cpp:134:40: runtime error: member call on null pointer of type 'const struct Image'
scene/3d/lightmap_gi.cpp:134:40: runtime error: member access within null pointer of type 'const struct Image'

================================================================
handle_crash: Program crashed with signal 11
Engine version: Godot Engine v4.0.alpha.custom_build (4b164b8e4790cfeb597b763123560b59a96458e5)
Dumping the backtrace. Please include this when reporting the bug on: https://github.com/godotengine/godot/issues
[1] godot4s() [0x2647ae8] (/home/runner/work/GodotBuilds/GodotBuilds/godot/platform/linuxbsd/crash_handler_linuxbsd.cpp:56)
[2] /lib/x86_64-linux-gnu/libc.so.6(+0x42520) [0x7fccb468e520] (??:0)
[3] LightmapGIData::_get_light_textures_data() const (/home/runner/work/GodotBuilds/GodotBuilds/godot/scene/3d/lightmap_gi.cpp:134 (discriminator 1))
[4] void call_with_variant_args_retc_helper<__UnexistingClass, Array>(__UnexistingClass*, Array (__UnexistingClass::*)() const, Variant const**, Variant&, Callable::CallError&, IndexSequence<>) (/home/runner/work/GodotBuilds/GodotBuilds/godot/./core/variant/binder_common.h:731 (discriminator 4))
[5] void call_with_variant_args_retc_dv<__UnexistingClass, Array>(__UnexistingClass*, Array (__UnexistingClass::*)() const, Variant const**, int, Variant&, Callable::CallError&, Vector<Variant> const&) (/home/runner/work/GodotBuilds/GodotBuilds/godot/./core/variant/binder_common.h:497)
[6] MethodBindTRC<Array>::call(Object*, Variant const**, int, Callable::CallError&) (/home/runner/work/GodotBuilds/GodotBuilds/godot/./core/object/method_bind.h:568)
[7] Object::callp(StringName const&, Variant const**, int, Callable::CallError&) (/home/runner/work/GodotBuilds/GodotBuilds/godot/core/object/object.cpp:733 (discriminator 1))
[8] Variant::callp(StringName const&, Variant const**, int, Variant&, Callable::CallError&) (/home/runner/work/GodotBuilds/GodotBuilds/godot/core/variant/variant_call.cpp:1048)
[9] GDScriptFunction::call(GDScriptInstance*, Variant const**, int, Callable::CallError&, GDScriptFunction::CallState*) (/home/runner/work/GodotBuilds/GodotBuilds/godot/modules/gdscript/gdscript_vm.cpp:1554)
[10] GDScriptInstance::callp(StringName const&, Variant const**, int, Callable::CallError&) (/home/runner/work/GodotBuilds/GodotBuilds/godot/modules/gdscript/gdscript.cpp:1627)
[11] bool Node::_gdvirtual__process_call<false>(double) (/home/runner/work/GodotBuilds/GodotBuilds/godot/scene/main/node.h:237 (discriminator 5))
[12] Node::_notification(int) (/home/runner/work/GodotBuilds/GodotBuilds/godot/scene/main/node.cpp:57)
[13] Node::_notificationv(int, bool) (/home/runner/work/GodotBuilds/GodotBuilds/godot/./scene/main/node.h:45 (discriminator 14))
[14] Object::notification(int, bool) (/home/runner/work/GodotBuilds/GodotBuilds/godot/core/object/object.cpp:792)
[15] SceneTree::_notify_group_pause(StringName const&, int) (/home/runner/work/GodotBuilds/GodotBuilds/godot/scene/main/scene_tree.cpp:917)
[16] SceneTree::process(double) (/home/runner/work/GodotBuilds/GodotBuilds/godot/scene/main/scene_tree.cpp:465 (discriminator 4))
[17] Main::iteration() (/home/runner/work/GodotBuilds/GodotBuilds/godot/main/main.cpp:2992)
[18] OS_LinuxBSD::run() (/home/runner/work/GodotBuilds/GodotBuilds/godot/platform/linuxbsd/os_linuxbsd.cpp:538)
[19] godot4s(main+0x4aa) [0x2644b90] (/home/runner/work/GodotBuilds/GodotBuilds/godot/platform/linuxbsd/godot_linuxbsd.cpp:74)
[20] /lib/x86_64-linux-gnu/libc.so.6(+0x29d90) [0x7fccb4675d90] (??:0)
[21] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80) [0x7fccb4675e40] (??:0)
[22] godot4s(_start+0x2e) [0x264462e] (??:?)
-- END OF BACKTRACE --
================================================================
```


This example was found by Godot fuzzer - [Qarminer](https://github.com/qarmin/Qarminer), so it is quite unlikelly that this code could be used in real project, but still this should be handled gracefully.


### Steps to reproduce

Above

### Minimal reproduction project

_No response_