The error isn’t the line itself; if model
is null here, there’s a problem elsewhere “before” that. IIUC model
contains the available cameras (or back cameras), so the detection of the cameras has failed already.
Have you tried to select different settings in Settings > Apps > Camera? Just setting them to something else and back again can fix some configuration issues.
Another thing that I could think of is some files being corrupted. You could try re-installing some packages to replace any corrupted files (this is a partial list of dependencies of jolla-camera
):
pkcon install --allow-reinstall gstreamer1.0-plugins-bad gstreamer1.0-plugins-good jolla-camera-lockscreen jolla-camera-settings nemo-qml-plugin-configuration-qt5 nemo-qml-plugin-dbus-qt5 nemo-qml-plugin-policy-qt5 nemo-qml-plugin-systemsettings qr-filter-qml-plugin qt5-qtdeclarative-import-models2 qt5-qtdeclarative-import-multimedia qt5-qtdeclarative-import-positioning qt5-qtdeclarative-import-sensors qt5-qtmultimedia-plugin-mediaservice-gstcamerabin qt5-qtmultimedia-plugin-mediaservice-gstmediaplayer sailfish-components-gallery-qt5 sailfish-components-media-qt5
I just did this with my Xperia 10 II, and it survived Well, at least Camera and Advanced Camera still work on Sailfish side, and OpenCamera on the Android side. Reinstalling packages should not be able to break anything, but treat this as a software update, and make backups as necessary.