summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--avmedia/source/vlc/wrapper/Common.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/avmedia/source/vlc/wrapper/Common.cxx b/avmedia/source/vlc/wrapper/Common.cxx
index 1ed5256f1755..4c28b6df93ca 100644
--- a/avmedia/source/vlc/wrapper/Common.cxx
+++ b/avmedia/source/vlc/wrapper/Common.cxx
@@ -11,6 +11,8 @@
namespace
{
+ const char AVMEDIA_NO_ERROR[] = "No error";
+
const char* ( *libvlc_get_version ) (void);
char * ( * libvlc_errmsg ) (void);
}
@@ -39,7 +41,8 @@ const char* Common::Version()
const char* Common::LastErrorMessage()
{
- return libvlc_errmsg();
+ const char *errorMsg = libvlc_errmsg();
+ return errorMsg == NULL ? AVMEDIA_NO_ERROR : errorMsg;
}
}
}