Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions libvisual-plugins/plugins/actor/gforce/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ ADD_SUBDIRECTORY(GForceWaveShapes)
#ADD_SUBDIRECTORY(NotWorkingWaveShapes)
ADD_SUBDIRECTORY(unix)
ADD_SUBDIRECTORY(docs)

INSTALL(FILES deffont DESTINATION ${GFORCE_DATA_DIR})
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FILE(GLOB gforce_ui_HEADERS "Headers/*")

SET(DATADIR $(LV_PLUGIN_DATA_DIR))
SET(DATADIR ${LV_PLUGIN_DATA_DIR}/actor/actor_gforce)

# Missing DrawXX.cpp and LineXX.cpp
SET(gforce_ui_SOURCES
Expand Down
10 changes: 8 additions & 2 deletions libvisual-plugins/plugins/actor/gforce/unix/libmfl/mfl.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ mfl_font mfl_LoadRawFont(const char *fname) {

/* Open font file */
ff = fopen(fname, "rb");
if (ff == NULL) goto lrf_open_fault;
if (ff == NULL) {
visual_log (VISUAL_LOG_WARNING, "Unable to open font file: %s", fname);
goto lrf_open_fault;
}

/* Get length of font file */
if (fseek(ff, 0, SEEK_END) != 0) goto lrf_fault;
Expand All @@ -70,6 +73,7 @@ mfl_font mfl_LoadRawFont(const char *fname) {

/* Read font data */
if (fread(f->data, 1, l, ff) != l) {
visual_log (VISUAL_LOG_WARNING, "Unable to fully read font file: %s", fname);
free(f->data);
free(f);
f = NULL;
Expand All @@ -84,7 +88,9 @@ mfl_font mfl_LoadRawFont(const char *fname) {
}

void mfl_DestroyFont(mfl_font f) {
visual_return_if_fail(f != NULL);
if (f == NULL) {
return;
}
free(f->data);
free(f);
}
Expand Down