Stop crash on media editor when no image present bug #2014

svn: r10544
This commit is contained in:
Gary Burton 2008-04-10 21:36:35 +00:00
parent 83d6db8be7
commit 18f863e84f

View File

@ -204,6 +204,8 @@ class EditMedia(EditPrimary):
def view_media(self, obj):
ref_obj = self.dbstate.db.get_object_from_handle(self.obj.handle)
if ref_obj:
mime_type = ref_obj.get_mime_type()
app = Mime.get_application(mime_type)
if app: