Skip to content

Commit

Permalink
Merge pull request #330 from kratz00/misc_fixes
Browse files Browse the repository at this point in the history
Minor bug fixes.
  • Loading branch information
Benjamin-Dobell committed Mar 1, 2016
2 parents a59a290 + 34c4636 commit 2bab8d9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions cmake/Findlibusb.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ find_path(LIBUSB_INCLUDE_DIR
)

if (libusb_USE_STATIC_LIBS AND NOT MSVC)
set (LIBUSB_LIB_PREFIX "lib" CACHE INTERNAL "libusb library name prefox passed to find_library")
set (LIBUSB_LIB_PREFIX "lib" CACHE INTERNAL "libusb library name prefix passed to find_library")
set (LIBUSB_LIB_SUFFIX ".a" CACHE INTERNAL "libusb library name suffix passed to find_library")
else (libusb_USE_STATIC_LIBS AND NOT MSVC)
set (LIBUSB_LIB_PREFIX "" CACHE INTERNAL "libusb library name prefox passed to find_library")
set (LIBUSB_LIB_PREFIX "" CACHE INTERNAL "libusb library name prefix passed to find_library")
set (LIBUSB_LIB_SUFFIX "" CACHE INTERNAL "libusb library name suffix passed to find_library")
endif (libusb_USE_STATIC_LIBS AND NOT MSVC)

Expand Down
4 changes: 2 additions & 2 deletions heimdall-frontend/source/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ bool MainWindow::ReadPit(QFile *file)
file->close();

bool success = currentPitData.Unpack(buffer);
delete buffer;
delete[] buffer;

if (!success)
currentPitData.Clear();
Expand Down Expand Up @@ -659,7 +659,7 @@ void MainWindow::SelectPartitionName(int index)

partitionFileGroup->setTitle(title);

if (!fileInfo.GetFilename().isEmpty())
if (pitEntry && !fileInfo.GetFilename().isEmpty())
{
QString partitionFilename = pitEntry->GetFlashFilename();
int lastPeriod = partitionFilename.lastIndexOf(QChar('.'));
Expand Down
2 changes: 1 addition & 1 deletion heimdall/source/FlashAction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ static bool sendTotalTransferSize(BridgeManager *bridgeManager, const vector<Par

if (totalBytesResult != 0)
{
Interface::PrintError("Unexpected session total bytes response!\nExpected: 0\nReceived:%d\n", totalBytesResponse);
Interface::PrintError("Unexpected session total bytes response!\nExpected: 0\nReceived:%d\n", totalBytesResult);
return (false);
}

Expand Down

0 comments on commit 2bab8d9

Please sign in to comment.