platform: add nm_platform_try_get() function

This commit is contained in:
Thomas Haller
2015-04-18 14:02:24 +02:00
parent 04ed48e5a0
commit 90caa93582
2 changed files with 7 additions and 0 deletions

View File

@@ -124,6 +124,12 @@ nm_platform_get ()
return singleton_instance; return singleton_instance;
} }
NMPlatform *
nm_platform_try_get (void)
{
return singleton_instance;
}
/******************************************************************/ /******************************************************************/
/** /**

View File

@@ -490,6 +490,7 @@ GType nm_platform_get_type (void);
void nm_platform_setup (NMPlatform *instance); void nm_platform_setup (NMPlatform *instance);
NMPlatform *nm_platform_get (void); NMPlatform *nm_platform_get (void);
NMPlatform *nm_platform_try_get (void);
#define NM_PLATFORM_GET (nm_platform_get ()) #define NM_PLATFORM_GET (nm_platform_get ())