File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -263,13 +263,14 @@ namespace Beefy.gfx
263263#if BF_PLATFORM_LINUX
264264
265265 const String FONTCONFIG_LIB = "libfontconfig. so";
266- static bool IsFontconfigAvailable { get ; private set ; } = true ;
266+ static bool IsFontconfigAvailable { get ; private set ; }
267267
268268 [ AlwaysInclude, StaticInitPriority( 100 ) ]
269269 private static class FontconfigAllowFail
270270 {
271271 static this ( )
272272 {
273+ SelfOuter. IsFontconfigAvailable = true;
273274 Runtime. AddErrorHandler( new ( stage, error) => {
274275 if ( stage == . PreFail )
275276 {
Original file line number Diff line number Diff line change @@ -589,9 +589,9 @@ enum DialogResult
589589
590590abstract class CommonDialog
591591{
592- protected Linux. DBus* mBus ~ Linux . SdBusUnref ( _ ) ;
593- protected Linux . DBusMsg * mRequest ~ Linux . SdBusMessageUnref ( _ ) ;
594- protected Linux . DBusErr mError ~ Linux . SdBusErrorFree ( & _ ) ;
592+ protected Linux. DBus* mBus ~ if ( _ != null ) Linux. SdBusUnref ( _ ) ;
593+ protected Linux . DBusMsg * mRequest ~ if ( _ != null ) Linux. SdBusMessageUnref ( _ ) ;
594+ protected Linux . DBusErr mError ~ if ( _ != default ) Linux. SdBusErrorFree ( & _ ) ;
595595 protected String mTitle ~ delete _;
596596 protected String mInitialDir ~ delete _;
597597 protected String[ ] mFileNames ~ DeleteContainerAndItems ! ( _ ) ;
Original file line number Diff line number Diff line change @@ -44,30 +44,28 @@ class Linux
4444
4545 public typealias DBusMsgHandler = function int32 ( DBusMsg * m , void * userdata , DBusErr * ret_error ) ;
4646
47- public static bool IsSystemdAvailable { get ; private set ; } = true ;
47+ public static bool IsSystemdAvailable { get ; private set ; }
4848
4949 [ AlwaysInclude , StaticInitPriority ( 100 ) ]
5050 static class AllowFail
5151 {
5252 public static this ( )
5353 {
54- Runtime . AddErrorHandler ( new => Handle ) ;
55- }
56-
57- public static Runtime . ErrorHandlerResult Handle ( Runtime . ErrorStage errorStage , Runtime . Error error )
58- {
59- if ( errorStage == . PreFail )
60- {
61- if ( var loadLibaryError = error as Runtime. LoadSharedLibraryError)
54+ IsSystemdAvailable = true ;
55+ Runtime . AddErrorHandler ( new ( stage , error ) => {
56+ if ( stage == . PreFail )
6257 {
63- if ( loadLibaryError . mPath == "libsystemd.so" )
58+ if ( var loadLibaryError = error as Runtime . LoadSharedLibraryError )
6459 {
65- IsSystemdAvailable = false ;
66- return . Ignore ;
60+ if ( loadLibaryError . mPath == "libsystemd.so" )
61+ {
62+ IsSystemdAvailable = false ;
63+ return . Ignore ;
64+ }
6765 }
6866 }
69- }
70- return . ContinueFailure ;
67+ return . ContinueFailure ;
68+ } ) ;
7169 }
7270 }
7371
You can’t perform that action at this time.
0 commit comments